MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001385XdebugRemote Debuggingpublic2017-01-07 12:582017-01-08 20:42
Reporternikita2206 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
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 Reproducee.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
Attached Files

- Relationships

-  Notes
(0004159)
nikita2206 (reporter)
2017-01-07 13:02

Fix is here https://github.com/xdebug/xdebug/pull/316 [^]
(0004160)
derick (administrator)
2017-01-07 17:41

Added a review to https://github.com/xdebug/xdebug/pull/316#pullrequestreview-15608910 [^]
(0004164)
derick (administrator)
2017-01-08 20:42

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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker