[xdebug-dev] svn: /xdebug/trunk/ tests/bug00565.phpt xdebug_stack.c

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Tue, 20 Apr 2010 12:44:37 +0000

derick Tue, 20 Apr 2010 12:44:37 +0000

Revision: http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&revision=3263&root=xdebug

Log:
- Fixed bug #565: xdebug.show_local_vars setting does not work with php 5.3.

Changed paths:
    A xdebug/trunk/tests/bug00565.phpt
    U xdebug/trunk/xdebug_stack.c

Added: xdebug/trunk/tests/bug00565.phpt
===================================================================
--- xdebug/trunk/tests/bug00565.phpt (rev 0)
+++ xdebug/trunk/tests/bug00565.phpt 2010-04-20 12:44:37 UTC (rev 3263)
@@ -0,0 +1,27 @@
+--TEST--
+Test for bug #565: xdebug.show_local_vars setting does not work with php 5.3.
+--INI--
+xdebug.default_enable=1
+xdebug.collect_params=1
+xdebug.show_local_vars=1
+--FILE--
+<?php
+function func(){
+ $a="hoge";
+ throw new Exception();
+}
+
+func();
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' in %sbug00565.php on line 4
+
+Exception: in %sbug00565.php on line 4
+
+Call Stack:
+ 0.0010 666392 1. {main}() %sbug00565.php:0
+ 0.0010 666392 2. func() %sbug00565.php:7
+
+
+Variables in local scope (#2):
+ $a = 'hoge'

Modified: xdebug/trunk/xdebug_stack.c
===================================================================
--- xdebug/trunk/xdebug_stack.c 2010-04-19 13:08:17 UTC (rev 3262)
+++ xdebug/trunk/xdebug_stack.c 2010-04-20 12:44:37 UTC (rev 3263)
@@ -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);
Received on Tue Apr 20 2010 - 13:44:37 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST