View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001166 | Xdebug | Uncategorized | public | 2015-06-22 21:13 | 2015-11-05 15:13 |
Reporter | plankmeister | Assigned To | derick | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 2.4.0beta1 | ||||
Summary | 0001166: Using $this in __debugInfo() causes infinite recursion (Doesn't appear to be the same as issue 0001140) | ||||
Description | When debugging with Xdebug 2.3.3 on PHP 5.6.9, stepping into an object that has a defined debugInfo() method that refers to $this causes an uncaught LogicException; 'The object is in an invalid state as the parent constructor was not called' | ||||
Steps To Reproduce | php -dxdebug.auto_trace=1 -dxdebug.collect_params=3 -r 'class Foo extends IteratorIterator{function __construct($items){if(is_array($items)){$items=new ArrayIterator($items);}}function __debugInfo(){return ["count"=>iterator_count($this)];}};$a=new Foo([1,2,3]);var_dump($a);' | ||||
Additional Information | Output extract: PHP Stack trace: | ||||
Tags | No tags attached. | ||||
Operating System | Debian GNU/Linux 7.8 (wheezy) | ||||
PHP Version | 5.5.15-5.5.19 | ||||
|
The actual Class in production code that produces the issue is https://github.com/cakephp/cakephp/blob/3.1/src/Collection/Collection.php if the context is important. |
|
Thanks - I can reproduce this with your reproduce script. Thanks for making it so short! I'll have a look. |
|
Fixed for 2.3.4 and 3.0dev |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-22 21:13 | plankmeister | New Issue | |
2015-06-22 21:16 | plankmeister | Note Added: 0003127 | |
2015-06-25 13:43 | derick | Note Added: 0003138 | |
2015-06-28 15:11 | derick | Note Added: 0003142 | |
2015-06-28 15:11 | derick | Status | new => closed |
2015-06-28 15:11 | derick | Assigned To | => derick |
2015-06-28 15:11 | derick | Resolution | open => fixed |
2015-06-28 15:11 | derick | Fixed in Version | => 2.3.4 |
2015-11-05 15:08 | derick | Fixed in Version | 2.3.4 => 2.4.0beta1 |
2015-11-05 15:13 | derick | Category | Debug client (console) => Usage problems |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |