| Description | All variables value displayed "Undefined" (HTML) or "uninitialized" (TEXT) in "Variables in local scope" when exception is thrown.
Please refer to the following.
Condition:
configuration settings : "xdebug.show_local_vars = 1"
$ php -r 'function func(){$a="hoge"; throw new Exception();} func();'
Displayed:
Fatal error: Uncaught exception 'Exception' in Command line code on line 1
Exception: in Command line code on line 1
Call Stack:
0.0002 620848 1. {main}() Command line code:0
0.0003 620848 2. func() Command line code:1
Dump $_GET
Dump $_POST
Variables in local scope (0000002):
$a = uninitialized
Expected:
Variables in local scope (0000002):
$a = 'hoge' |
|---|
| Additional Information | This problem was confirmed to operate normally with the following patches.
I think that it is a problem of originating in "Lazy EG(active_symbol_table) initialization".
It is log message of php 5.3 svn repository at revision 258703.
--- xdebug.c.original 2010-04-15 15:39:56.000000000 +0900
+++ xdebug.c 2010-04-15 16:40:06.000000000 +0900
@@ -1457,7 +1457,13 @@
efree(args);
WRONG_PARAM_COUNT;
}
-
-
+#if PHP_VERSION_ID >= 50300
- if (!EG(active_symbol_table)) {
- zend_rebuild_symbol_table(TSRMLS_C);
- }
+#endif
-
for (i = 0; i < argc; i++) {
if (Z_TYPE_PP(args[i]) == IS_STRING) {
XG(active_symbol_table) = EG(active_symbol_table);
@@ -1498,7 +1504,13 @@
efree(args);
WRONG_PARAM_COUNT;
}
-
-
+#if PHP_VERSION_ID >= 50300
- if (!EG(active_symbol_table)) {
- zend_rebuild_symbol_table(TSRMLS_C);
- }
+#endif
-
for (i = 0; i < argc; i++) {
if (Z_TYPE_PP(args[i]) == IS_STRING) {
XG(active_symbol_table) = EG(active_symbol_table);
--- xdebug_stack.c.original 2010-04-15 15:45:52.000000000 +0900
+++ xdebug_stack.c 2010-04-15 16:39:21.000000000 +0900
@@ -90,6 +90,12 @@
return;
}
+#if PHP_VERSION_ID >= 50300
- if (!EG(active_symbol_table)) {
- zend_rebuild_symbol_table(TSRMLS_C);
- }
+#endif
-
tmp_ht = XG(active_symbol_table);
XG(active_symbol_table) = EG(active_symbol_table);
zvar = xdebug_get_php_symbol(name, strlen(name) + 1);
|
|---|