View Issue Details

IDProjectCategoryView StatusLast Update
0001181Xdebug(No Category)public2015-12-07 11:32
ReporterBlizzAssigned Toderick 
Status closedResolutionfixed 
PlatformMacOSMacOSOS Version10.10.4
Product Version2.3.3 
Target Version2.4.1Fixed in Version2.4.0rc2 
Summary0001181: Derived class with __get gets called on fetching base class private property
DescriptionYii2's __get() implementation throws an exception when __get is called with a non-existing $name. It seems that XDebug calls the __get function to obtain the value for a private variable of the base class and the resulting exception is not caught.

Possibly related: Clicking open a Closure also results in an similar exception ("Closue object cannot have properties"). Please let me know if you would like an extra ticket for that.

Code example (no dependencies):

class BaseClass {
    protected $protected = [1, 2, 3];
    private $private = ['a', 'b', 'c'];

class DerivedClass extends BaseClass {
    function __get($name)
        throw new \Exception('Derived class getter called with: ' . $name);

try {
    $test = new DerivedClass();
    echo "Statement to break on."; // Breakpoint here
catch (\Exception $e) {
    echo $e->getMessage();
Steps To ReproduceSet the breakpoint, start the session and when the breakpoint hits, open up the $test variable. In the test variable, click open *BaseClass*private.
After this, do a step over. It will jump into the catch handler.

Additional InformationReported in and per your instructions duplicated here. A screencast of the behavior can be found there as well.

Jetbrains reports that it is not reproducible in 2.3.2 but it is in 2.3.3, haven't tried to confirm this.

Direct links:
Source file:
TagsNo tags attached.
Operating SystemCentos 7.1
PHP Version5.6.0-5.6.4



2015-08-25 17:47


xdebug.log (35,204 bytes)


2015-08-25 18:01


test.php (391 bytes)


2015-11-22 15:39

administrator   ~0003256

Fixed in 2.4.0. Thanks for the report! I would indeed like a separate issue
for the closure issue - unless that got fixed with this bug fix of course.

Issue History

Date Modified Username Field Change
2015-08-25 17:47 Blizz New Issue
2015-08-25 17:47 Blizz File Added: xdebug.log
2015-08-25 18:01 Blizz File Added: test.php
2015-11-20 17:59 derick Target Version => 2.4.1
2015-11-22 15:39 derick Note Added: 0003256
2015-11-22 15:39 derick Status new => closed
2015-11-22 15:39 derick Assigned To => derick
2015-11-22 15:39 derick Resolution open => fixed
2015-11-22 15:39 derick Fixed in Version => 2.4.0
2015-12-07 11:32 derick Fixed in Version 2.4.0 => 2.4.0rc2
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)