View Issue Details

IDProjectCategoryView StatusLast Update
0001385XdebugStep Debuggingpublic2017-01-08 20:42
Reporternikita2206 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.5.0 
Target Version2.5.1Fixed in Version2.5.1 
Summary0001385: Can not fetch IS_INDIRECT private properties
Description

property_get -n $b->*A*a->children will always result in "can not get property" error message.

(affected all versions of PHP >=7)

Steps To Reproduce

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.

TagsNo tags attached.
Operating System
PHP Version7.0.10-7.0.14

Activities

nikita2206

2017-01-07 13:02

reporter   ~0004159

Fix is here https://github.com/xdebug/xdebug/pull/316

derick

2017-01-07 17:41

administrator   ~0004160

Added a review to https://github.com/xdebug/xdebug/pull/316#pullrequestreview-15608910

derick

2017-01-08 20:42

administrator   ~0004164

Fixed for 2.5.1 - thanks for the patch!