Skip to content

Instantly share code, notes, and snippets.

@tomnomnom
Created May 15, 2012 21:59
Show Gist options
  • Save tomnomnom/2705478 to your computer and use it in GitHub Desktop.
Save tomnomnom/2705478 to your computer and use it in GitHub Desktop.
XDEBUG_PROFILE trigger from CLI patch
From a7209454d1817f0e79b62d78b370cd8390fb1069 Mon Sep 17 00:00:00 2001
From: Tom Hudson <[email protected]>
Date: Tue, 15 May 2012 22:55:24 +0100
Subject: [PATCH] Enabled use of XDEBUG_PROFILE trigger from CLI via _ENV
globals
---
xdebug.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xdebug.c b/xdebug.c
index bb788f9..3a17838 100644
--- a/xdebug.c
+++ b/xdebug.c
@@ -1048,6 +1048,9 @@ static int xdebug_trigger_enabled(int setting, char *var_name TSRMLS_DC)
) || (
PG(http_globals)[TRACK_VARS_COOKIE] &&
zend_hash_find(PG(http_globals)[TRACK_VARS_COOKIE]->value.ht, var_name, strlen(var_name) + 1, (void **) &dummy) == SUCCESS
+ ) || (
+ PG(http_globals)[TRACK_VARS_ENV] &&
+ zend_hash_find(PG(http_globals)[TRACK_VARS_ENV]->value.ht, var_name, strlen(var_name) + 1, (void **) &dummy) == SUCCESS
)
) {
return 1;
--
1.7.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment