MantisBT - Xdebug
View Issue Details
0001385XdebugRemote Debuggingpublic2017-01-07 12:582017-01-08 20:42
nikita2206 
derick 
normalminoralways
closedfixed 
2.5.0 
2.5.12.5.1 
7.0.10-7.0.14
0001385: Can not fetch IS_INDIRECT private properties
`property_get -n $b->*A*a->children` will always result in "can not get property" error message.

(affected all versions of PHP >=7)
e.php
<?php

class A {
  private $a;
  public function __construct($a) {
    $this->a = $a;
  }
}
class B extends A {
  public $a;
  public function __construct($privA, $a) {
    parent::__construct($privA);
    $this->a = $a;
}

$chain = new A(new B(new A(1), 2));
echo 1; // breakpoint here

---- end of file ----

Now if we try to run this script until the breakpoint and call `property_get -d 0 -c 0 -n $chain->a->*A*a->a` we will get an error instead of `1`.
No tags attached.
Issue History
2017-01-07 12:58nikita2206New Issue
2017-01-07 13:02nikita2206Note Added: 0004159
2017-01-07 17:41derickCategoryUsage problems (Wrong Results) => Remote Debugging
2017-01-07 17:41derickTarget Version => 2.5.1
2017-01-07 17:41derickSummaryproperty_get can't retrieve children of private fields => Can not fetch IS_INDIRECT private properties
2017-01-07 17:41derickNote Added: 0004160
2017-01-07 17:41derickAssigned To => derick
2017-01-07 17:41derickStatusnew => confirmed
2017-01-08 20:42derickNote Added: 0004164
2017-01-08 20:42derickStatusconfirmed => closed
2017-01-08 20:42derickResolutionopen => fixed
2017-01-08 20:42derickFixed in Version => 2.5.1

Notes
(0004159)
nikita2206   
2017-01-07 13:02   
Fix is here https://github.com/xdebug/xdebug/pull/316 [^]
(0004160)
derick   
2017-01-07 17:41   
Added a review to https://github.com/xdebug/xdebug/pull/316#pullrequestreview-15608910 [^]
(0004164)
derick   
2017-01-08 20:42   
Fixed for 2.5.1 - thanks for the patch!