View Issue Details

IDProjectCategoryView StatusLast Update
0000494XdebugUncategorizedpublic2010-03-21 22:00
Reportermigajek Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.0dev 
Target Version2.1.0RC1Fixed in Version2.1.0RC1 
Summary0000494: Private attributes of parent class unavailable when inheriting
Description

Hi,
when the parent class has some private attributes, we can't access them using XDebug. However var_dump works fine in this case.

the code I've used is:
class abc {
private $arr;
public function abc(){
$this->arr = array(
0 => array("some", "values"),
1 => array("some", "more", "values")
);
}
}

class def extends abc {

}

$o = new def;
echo "o: ";
var_dump($o);

Have a look at the end of the log:
there is no "fullname" property in that case...

[ log ] property_get -i 10 -n $o
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="property_get" transaction_id="10"><property name="$o" fullname="$o" address="148281248" type="object" children="1" classname="def" numchildren="1"><property name="CLASSNAME" type="string"><![CDATA[def]]></property><property name="arr" facet="private" address="148282540"></property></property></response>

Comparing to what happens when I use "abc" (base) class:

[ log ] property_get -i 10 -n $o
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="property_get" transaction_id="10"><property name="$o" fullname="$o" address="148281248" type="object" children="1" classname="abc" numchildren="1"><property name="CLASSNAME" type="string"><![CDATA[abc]]></property><property name="arr" fullname="$o->arr" facet="private" address="148282540" type="array" children="1" numchildren="2"></property></property></response>

Which is obvious reason why it fails.
I'm using latest SVN version (compiled today, 28 Nov 2009). I've tried it on 2.0.5 compiled with PECL as well.
Both on Ubuntu Linux. Thread safe mode, 32 bit.

Additional Information

[ log ] HateML Pro 2: listening at port 9000 [timeout = 30000]
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; fileuri="file:///var/www/xdebug.php" language="PHP" protocol_version="1.0" appid="25089" idekey="default"><engine version="2.1.0-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]>&lt;/url>&lt;copyright>&lt;![CDATA[Copyright (c) 2002-2009 by Derick Rethans]]></copyright></init>
[ log ] feature_set -i 1 -n multiple_sessions -v 0
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="feature_set" transaction_id="1" feature="multiple_sessions" success="1"></response>
[ log ] stdout -i 3 -c 0
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="stdout" transaction_id="3" success="0"></response>
========= session default file:///var/www/xdebug.php starts =======
[ log ] status -i 4
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="status" transaction_id="4" status="starting" reason="ok"></response>
[ log ] breakpoint_set -i 5 -t line -s enabled -f file:///var/www/xdebug.php -n 38
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="breakpoint_set" transaction_id="5" state="enabled" id="250890014"></response>
[ log ] run -i 6
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="run" transaction_id="6" status="break" reason="ok"><xdebug:message filename="file:///var/www/xdebug.php" lineno="38"></xdebug:message></response>
[ log ] stack_get -i 7
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="stack_get" transaction_id="7"><stack where="{main}" level="0" type="file" filename="file:///var/www/xdebug.php" lineno="38"></stack></response>
[ log ] property_get -i 10 -n $o
[ log ] <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="property_get" transaction_id="10"><property name="$o" fullname="$o" address="148281248" type="object" children="1" classname="def" numchildren="1"><property name="CLASSNAME" type="string"><![CDATA[def]]></property><property name="arr" facet="private" address="148282540"></property></property></response>

TagsNo tags attached.
Operating SystemUbuntu Linux
PHP Version5.3.0

Activities

derick

2009-12-28 17:35

administrator   ~0001216

Fixed in SVN rev. 3168.

derick

2009-12-30 12:07

administrator   ~0001237

Reopened, no way to access those elements through DBGP yet.

derick

2010-03-21 22:00

administrator   ~0001403

Fixed in SVN.

Issue History

Date Modified Username Field Change
2009-11-28 19:55 migajek New Issue
2009-11-28 19:55 migajek Operating System => Ubuntu Linux
2009-11-28 19:55 migajek PHP Version => 5.3.0
2009-11-28 19:55 migajek Xdebug Version => 2.0.5
2009-12-28 17:35 derick Note Added: 0001216
2009-12-28 17:35 derick Status new => closed
2009-12-28 17:35 derick Resolution open => fixed
2009-12-30 12:07 derick Note Added: 0001237
2009-12-30 12:07 derick Status closed => confirmed
2010-03-20 23:50 derick Target Version => 2.1.0RC1
2010-03-21 22:00 derick Note Added: 0001403
2010-03-21 22:00 derick Status confirmed => closed
2010-03-21 22:00 derick Fixed in Version => 2.1.0RC1
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized