Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug #821: Variable assignments (beginning with =>) should be in…

…dented one more scope.
  • Loading branch information...
commit 7d648b7fb473a8b9b45ab64d2f93ae403aac12c8 1 parent cf99e3d
Derick Rethans authored
24 tests/assignment-trace1.phpt
View
@@ -47,20 +47,20 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%sxt' %sassignment-trace1.php:2
+ => $tf = '/tmp/%sxt' %sassignment-trace1.php:2
%w%f %w%d -> test($a = 1, $b = 2, $c = 3) %sassignment-trace1.php:29
- => $d = 89 %sassignment-trace1.php:6
- => $a += 2 %sassignment-trace1.php:7
- => $c /= 7 %sassignment-trace1.php:8
- => $b *= 9 %sassignment-trace1.php:9
+ => $d = 89 %sassignment-trace1.php:6
+ => $a += 2 %sassignment-trace1.php:7
+ => $c /= 7 %sassignment-trace1.php:8
+ => $b *= 9 %sassignment-trace1.php:9
%w%f %w%d -> testClass->__construct() %sassignment-trace1.php:30
- => $this->a = 98 %sassignment-trace1.php:20
- => $this->b = 4 %sassignment-trace1.php:21
- => $this->b -= 8 %sassignment-trace1.php:22
- => $this->b *= -0.5 %sassignment-trace1.php:23
- => $this->b <<= 1 %sassignment-trace1.php:24
- => $this->c = 0.125 %sassignment-trace1.php:25
- => $a = class testClass { public $a = 98; private $b = 4; protected $c = 0.125 } %sassignment-trace1.php:30
+ => $this->a = 98 %sassignment-trace1.php:20
+ => $this->b = 4 %sassignment-trace1.php:21
+ => $this->b -= 8 %sassignment-trace1.php:22
+ => $this->b *= -0.5 %sassignment-trace1.php:23
+ => $this->b <<= 1 %sassignment-trace1.php:24
+ => $this->c = 0.125 %sassignment-trace1.php:25
+ => $a = class testClass { public $a = 98; private $b = 4; protected $c = 0.125 } %sassignment-trace1.php:30
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace1.php:32
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
28 tests/assignment-trace2.phpt
View
@@ -46,21 +46,21 @@ Call Stack:
%w%f %w%d 2. test(1, 2, 3) %sassignment-trace2.php:21
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%s.xt' %sassignment-trace2.php:2
- => $t = array () %sassignment-trace2.php:13
- => $t['a'] = 98 %sassignment-trace2.php:14
- => $t['b'] = 4 %sassignment-trace2.php:15
- => $t['b'] -= 8 %sassignment-trace2.php:16
- => $t['b'] *= -0.5 %sassignment-trace2.php:17
- => $t['b'] <<= 1 %sassignment-trace2.php:18
- => $t['c'] = 0.125 %sassignment-trace2.php:19
+ => $tf = '/tmp/%s.xt' %sassignment-trace2.php:2
+ => $t = array () %sassignment-trace2.php:13
+ => $t['a'] = 98 %sassignment-trace2.php:14
+ => $t['b'] = 4 %sassignment-trace2.php:15
+ => $t['b'] -= 8 %sassignment-trace2.php:16
+ => $t['b'] *= -0.5 %sassignment-trace2.php:17
+ => $t['b'] <<= 1 %sassignment-trace2.php:18
+ => $t['c'] = 0.125 %sassignment-trace2.php:19
%w%f %w%d -> test(1, 2, 3) %sassignment-trace2.php:21
- => $t = array ('a' => 4, 'b' => 9, 'c' => 13) %sassignment-trace2.php:6
- => $t['d'] = 89 %sassignment-trace2.php:7
- => $t['a'] += NULL %sassignment-trace2.php:8
- => $t['a'] += NULL %sassignment-trace2.php:9
- => $t['c'] /= 7 %sassignment-trace2.php:10
- => $t['b'] *= 9 %sassignment-trace2.php:11
+ => $t = array ('a' => 4, 'b' => 9, 'c' => 13) %sassignment-trace2.php:6
+ => $t['d'] = 89 %sassignment-trace2.php:7
+ => $t['a'] += NULL %sassignment-trace2.php:8
+ => $t['a'] += NULL %sassignment-trace2.php:9
+ => $t['c'] /= 7 %sassignment-trace2.php:10
+ => $t['b'] *= 9 %sassignment-trace2.php:11
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace2.php:23
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
8 tests/assignment-trace3.phpt
View
@@ -30,10 +30,10 @@ Call Stack:
%w%f %w%d 1. {main}() %sassignment-trace3.php:0
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '%s' %sassignment-trace3.php:2
- => $t = array ('a' => 4, 'b' => 9, 'c' => 13) %sassignment-trace3.php:4
- => $t['a'] += NULL %sassignment-trace3.php:5
- => $t['a'] += NULL %sassignment-trace3.php:6
+ => $tf = '%s' %sassignment-trace3.php:2
+ => $t = array ('a' => 4, 'b' => 9, 'c' => 13) %sassignment-trace3.php:4
+ => $t['a'] += NULL %sassignment-trace3.php:5
+ => $t['a'] += NULL %sassignment-trace3.php:6
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace3.php:8
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
8 tests/assignment-trace4.phpt
View
@@ -30,10 +30,10 @@ Call Stack:
%w%f %w%d 1. {main}() %sassignment-trace4.php:0
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '%s' %sassignment-trace4.php:2
- => $t = 42 %sassignment-trace4.php:4
- => $t += NULL %sassignment-trace4.php:5
- => $t += NULL %sassignment-trace4.php:6
+ => $tf = '%s' %sassignment-trace4.php:2
+ => $t = 42 %sassignment-trace4.php:4
+ => $t += NULL %sassignment-trace4.php:5
+ => $t += NULL %sassignment-trace4.php:6
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace4.php:8
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
6 tests/assignment-trace5.phpt
View
@@ -22,9 +22,9 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '%s' %sassignment-trace5.php:2
- => $t = array () %sassignment-trace5.php:4
- => $t[] = 42 %sassignment-trace5.php:5
+ => $tf = '%s' %sassignment-trace5.php:2
+ => $t = array () %sassignment-trace5.php:4
+ => $t[] = 42 %sassignment-trace5.php:5
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace5.php:7
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
20 tests/assignment-trace6.phpt
View
@@ -40,17 +40,17 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '%s' %sassignment-trace6.php:2
+ => $tf = '%s' %sassignment-trace6.php:2
%w%f %w%d -> foo::test() %sassignment-trace6.php:23
- => self::foo = array () %sassignment-trace6.php:11
- => self::foo[] = 42 %sassignment-trace6.php:12
- => self::var = 'var' %sassignment-trace6.php:13
- => self::var2 = 'var' %sassignment-trace6.php:14
- => $id = 42 %sassignment-trace6.php:15
- => self::foo[42] = 44 %sassignment-trace6.php:16
- => self::bar['test'] = array () %sassignment-trace6.php:18
- => $id = 'test' %sassignment-trace6.php:19
- => bar['test'][] = 55 %sassignment-trace6.php:20
+ => self::foo = array () %sassignment-trace6.php:11
+ => self::foo[] = 42 %sassignment-trace6.php:12
+ => self::var = 'var' %sassignment-trace6.php:13
+ => self::var2 = 'var' %sassignment-trace6.php:14
+ => $id = 42 %sassignment-trace6.php:15
+ => self::foo[42] = 44 %sassignment-trace6.php:16
+ => self::bar['test'] = array () %sassignment-trace6.php:18
+ => $id = 'test' %sassignment-trace6.php:19
+ => bar['test'][] = 55 %sassignment-trace6.php:20
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace6.php:25
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
24 tests/assignment-trace7.phpt
View
@@ -47,20 +47,20 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%s.xt' %sassignment-trace7.php:2
+ => $tf = '/tmp/%s.xt' %sassignment-trace7.php:2
%w%f %w%d -> test($a = 1, $b = 2, $c = 3) %sassignment-trace7.php:29
- => $d = 89 %sassignment-trace7.php:6
- => $a += 2 %sassignment-trace7.php:7
- => $c /= 7 %sassignment-trace7.php:8
- => $b *= 9 %sassignment-trace7.php:9
+ => $d = 89 %sassignment-trace7.php:6
+ => $a += 2 %sassignment-trace7.php:7
+ => $c /= 7 %sassignment-trace7.php:8
+ => $b *= 9 %sassignment-trace7.php:9
%w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace7.php:30
- => $obj->a = 98 %sassignment-trace7.php:20
- => $obj->b = 4 %sassignment-trace7.php:21
- => $obj->b -= 8 %sassignment-trace7.php:22
- => $obj->b *= -0.5 %sassignment-trace7.php:23
- => $obj->b <<= 1 %sassignment-trace7.php:24
- => $obj->c = 0.125 %sassignment-trace7.php:25
- => $a = class testClass { public $a = NULL; private $b = NULL; protected $c = NULL } %sassignment-trace7.php:30
+ => $obj->a = 98 %sassignment-trace7.php:20
+ => $obj->b = 4 %sassignment-trace7.php:21
+ => $obj->b -= 8 %sassignment-trace7.php:22
+ => $obj->b *= -0.5 %sassignment-trace7.php:23
+ => $obj->b <<= 1 %sassignment-trace7.php:24
+ => $obj->c = 0.125 %sassignment-trace7.php:25
+ => $a = class testClass { public $a = NULL; private $b = NULL; protected $c = NULL } %sassignment-trace7.php:30
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace7.php:32
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
36 tests/assignment-trace8.phpt
View
@@ -53,25 +53,25 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%s.xt' %sassignment-trace8.php:2
+ => $tf = '/tmp/%s.xt' %sassignment-trace8.php:2
%w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace8.php:33
- => $obj->a = class stdClass { } %sassignment-trace8.php:11
- => $obj->a->bar = 52 %sassignment-trace8.php:12
- => $obj->a->foo = class stdClass { } %sassignment-trace8.php:13
- => $obj->a->foo->bar = 52 %sassignment-trace8.php:14
- => $this->a = class stdClass { } %sassignment-trace8.php:16
- => $this->a->bar = 52 %sassignment-trace8.php:17
- => $this->a->foo = class stdClass { } %sassignment-trace8.php:18
- => $this->a->foo->bar = 52 %sassignment-trace8.php:19
- => self::b = class stdClass { } %sassignment-trace8.php:21
- => self::b->bar = 52 %sassignment-trace8.php:22
- => self::b->foo = class stdClass { } %sassignment-trace8.php:23
- => b->foo->bar = 52 %sassignment-trace8.php:24
- => self::b = class stdClass { } %sassignment-trace8.php:26
- => self::b->bar = 52 %sassignment-trace8.php:27
- => self::b->foo = class stdClass { } %sassignment-trace8.php:28
- => b->foo->bar = 52 %sassignment-trace8.php:29
- => $a = class testClass { public $a = class stdClass { public $bar = 52; public $foo = class stdClass { public $bar = 52 } } } %sassignment-trace8.php:33
+ => $obj->a = class stdClass { } %sassignment-trace8.php:11
+ => $obj->a->bar = 52 %sassignment-trace8.php:12
+ => $obj->a->foo = class stdClass { } %sassignment-trace8.php:13
+ => $obj->a->foo->bar = 52 %sassignment-trace8.php:14
+ => $this->a = class stdClass { } %sassignment-trace8.php:16
+ => $this->a->bar = 52 %sassignment-trace8.php:17
+ => $this->a->foo = class stdClass { } %sassignment-trace8.php:18
+ => $this->a->foo->bar = 52 %sassignment-trace8.php:19
+ => self::b = class stdClass { } %sassignment-trace8.php:21
+ => self::b->bar = 52 %sassignment-trace8.php:22
+ => self::b->foo = class stdClass { } %sassignment-trace8.php:23
+ => b->foo->bar = 52 %sassignment-trace8.php:24
+ => self::b = class stdClass { } %sassignment-trace8.php:26
+ => self::b->bar = 52 %sassignment-trace8.php:27
+ => self::b->foo = class stdClass { } %sassignment-trace8.php:28
+ => b->foo->bar = 52 %sassignment-trace8.php:29
+ => $a = class testClass { public $a = class stdClass { public $bar = 52; public $foo = class stdClass { public $bar = 52 } } } %sassignment-trace8.php:33
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace8.php:35
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
36 tests/assignment-trace9.phpt
View
@@ -53,25 +53,25 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%s.xt' %sassignment-trace9.php:2
+ => $tf = '/tmp/%s.xt' %sassignment-trace9.php:2
%w%f %w%d -> testClass->__construct($obj = class stdClass { }) %sassignment-trace9.php:33
- => $obj->a = array () %sassignment-trace9.php:11
- => $obj->a['bar'] = 52 %sassignment-trace9.php:12
- => $obj->a['foo'] = class stdClass { } %sassignment-trace9.php:13
- => $obj->a['foo']->bar = 52 %sassignment-trace9.php:14
- => $this->a = array () %sassignment-trace9.php:16
- => $this->a['bar'] = 52 %sassignment-trace9.php:17
- => $this->a['foo'] = class stdClass { } %sassignment-trace9.php:18
- => $this->a['foo']->bar = 52 %sassignment-trace9.php:19
- => self::b = array () %sassignment-trace9.php:21
- => self::b['bar'] = array () %sassignment-trace9.php:22
- => self::b['foo'] = class stdClass { } %sassignment-trace9.php:23
- => b['foo']->bar = 52 %sassignment-trace9.php:24
- => self::b = array () %sassignment-trace9.php:26
- => self::b['bar'] = array () %sassignment-trace9.php:27
- => self::b['foo'] = class stdClass { } %sassignment-trace9.php:28
- => b['foo']->bar = 52 %sassignment-trace9.php:29
- => $a = class testClass { public $a = array ('bar' => 52, 'foo' => class stdClass { public $bar = 52 }) } %sassignment-trace9.php:33
+ => $obj->a = array () %sassignment-trace9.php:11
+ => $obj->a['bar'] = 52 %sassignment-trace9.php:12
+ => $obj->a['foo'] = class stdClass { } %sassignment-trace9.php:13
+ => $obj->a['foo']->bar = 52 %sassignment-trace9.php:14
+ => $this->a = array () %sassignment-trace9.php:16
+ => $this->a['bar'] = 52 %sassignment-trace9.php:17
+ => $this->a['foo'] = class stdClass { } %sassignment-trace9.php:18
+ => $this->a['foo']->bar = 52 %sassignment-trace9.php:19
+ => self::b = array () %sassignment-trace9.php:21
+ => self::b['bar'] = array () %sassignment-trace9.php:22
+ => self::b['foo'] = class stdClass { } %sassignment-trace9.php:23
+ => b['foo']->bar = 52 %sassignment-trace9.php:24
+ => self::b = array () %sassignment-trace9.php:26
+ => self::b['bar'] = array () %sassignment-trace9.php:27
+ => self::b['foo'] = class stdClass { } %sassignment-trace9.php:28
+ => b['foo']->bar = 52 %sassignment-trace9.php:29
+ => $a = class testClass { public $a = array ('bar' => 52, 'foo' => class stdClass { public $bar = 52 }) } %sassignment-trace9.php:33
%w%f %w%d -> xdebug_stop_trace() %sassignment-trace9.php:35
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
10 tests/bug00501.phpt
View
@@ -25,11 +25,11 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '%s' %sbug00501.php:2
- => $i = 10 %sbug00501.php:4
- => ++$i %sbug00501.php:7
- => $i++ %sbug00501.php:8
- => $i += 33 %sbug00501.php:8
+ => $tf = '%s' %sbug00501.php:2
+ => $i = 10 %sbug00501.php:4
+ => ++$i %sbug00501.php:7
+ => $i++ %sbug00501.php:8
+ => $i += 33 %sbug00501.php:8
%w%f %w%d -> xdebug_stop_trace() %sbug00501.php:10
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
2  tests/bug00690-2.phpt
View
@@ -22,6 +22,6 @@ DONE
TRACE START [%d-%d-%d %d:%d:%d]
%w%f %w%d -> xdebug_get_tracefile_name() %sbug00690-2.php:3
>=> '/tmp/trace.bug690.xt'
- => $trace_file = '/tmp/trace.bug690.xt' %sbug00690-2.php:3
+ => $trace_file = '/tmp/trace.bug690.xt' %sbug00690-2.php:3
%w%f %w%d -> file_get_contents('/tmp/trace.bug690.xt') %sbug00690-2.php:5
8 tests/bug00701.phpt
View
@@ -23,12 +23,12 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/xdt%s.xt' %sbug00701.php:2
- => $class = 'class' %sbug00701.php:4
- => $method = 'methodName' %sbug00701.php:5
+ => $tf = '/tmp/xdt%s.xt' %sbug00701.php:2
+ => $class = 'class' %sbug00701.php:4
+ => $method = 'methodName' %sbug00701.php:5
%w%f %w%d -> ucfirst('class') %sbug00701.php:6
>=> 'Class'
- => $action_ids[???]['methodName'] = 'methodName' %sbug00701.php:6
+ => $action_ids[???]['methodName'] = 'methodName' %sbug00701.php:6
%w%f %w%d -> xdebug_stop_trace() %sbug00701.php:8
%w%f %w%d
TRACE END [%d-%d-%d %d:%d:%d]
12 tests/bug00756.phpt
View
@@ -44,19 +44,19 @@ echo "DONE\n";
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/xdt%s.%s.xt' %sbug00756.php:18
+ => $tf = '/tmp/xdt%s.%s.xt' %sbug00756.php:18
%w%f %w%d -> xdebug_get_tracefile_name() %sbug00756.php:19
>=> '/tmp/xdt%s.%s.xt'
- => $trace_file = '/tmp/xdt%s.%s.xt' %sbug00756.php:19
+ => $trace_file = '/tmp/xdt%s.%s.xt' %sbug00756.php:19
%w%f %w%d -> foo::bar() %sbug00756.php:21
- => self::bar++ %sbug00756.php:9
+ => self::bar++ %sbug00756.php:9
>=> NULL
%w%f %w%d -> foo->foo() %sbug00756.php:22
- => $this->foo++ %sbug00756.php:14
+ => $this->foo++ %sbug00756.php:14
>=> NULL
- => $f = class foo { public $foo = 1 } %sbug00756.php:22
+ => $f = class foo { public $foo = 1 } %sbug00756.php:22
%w%f %w%d -> foo->foo() %sbug00756.php:23
- => $this->foo++ %sbug00756.php:14
+ => $this->foo++ %sbug00756.php:14
>=> NULL
%w%f %w%d -> file_get_contents('/tmp/xdt%s.%s.xt') %sbug00756.php:25
DONE
4 tests/closure-trace.phpt
View
@@ -31,9 +31,9 @@ unlink($tf);
?>
--EXPECTF--
TRACE START [%d-%d-%d %d:%d:%d]
- => $tf = '/tmp/%s.xt' %sclosure-trace.php:2
+ => $tf = '/tmp/%s.xt' %sclosure-trace.php:2
%w%f %w%d -> test1() %sclosure-trace.php:13
- => $f = class Closure { } %sclosure-trace.php:8
+ => $f = class Closure { } %sclosure-trace.php:8
%w%f %w%d -> {closure:%sclosure-trace.php:6-8}($a = 5, $b = 25) %sclosure-trace.php:10
%w%f %w%d -> strlen(125) %sclosure-trace.php:7
>=> 3
2  xdebug_tracing.c
View
@@ -70,7 +70,7 @@ char* xdebug_return_trace_assignment(function_stack_entry *i, char *varname, zva
if (XG(show_mem_delta)) {
xdebug_str_addl(&str, " ", 8, 0);
}
- for (j = 0; j < i->level; j++) {
+ for (j = 0; j <= i->level; j++) {
xdebug_str_addl(&str, " ", 2, 0);
}
xdebug_str_addl(&str, " => ", 6, 0);
Please sign in to comment.
Something went wrong with that request. Please try again.