View Issue Details

IDProjectCategoryView StatusLast Update
0001385XdebugStep Debuggingpublic2017-01-08 20:42
Reporternikita2206 Assigned Toderick  
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!

Issue History

Date Modified Username Field Change
2017-01-07 12:58 nikita2206 New Issue
2017-01-07 13:02 nikita2206 Note Added: 0004159
2017-01-07 17:41 derick Category Usage problems (Wrong Results) => Remote Debugging
2017-01-07 17:41 derick Target Version => 2.5.1
2017-01-07 17:41 derick Summary property_get can't retrieve children of private fields => Can not fetch IS_INDIRECT private properties
2017-01-07 17:41 derick Note Added: 0004160
2017-01-07 17:41 derick Assigned To => derick
2017-01-07 17:41 derick Status new => confirmed
2017-01-08 20:42 derick Note Added: 0004164
2017-01-08 20:42 derick Status confirmed => closed
2017-01-08 20:42 derick Resolution open => fixed
2017-01-08 20:42 derick Fixed in Version => 2.5.1
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging