View Issue Details

IDProjectCategoryView StatusLast Update
0000806XdebugUncategorizedpublic2012-04-07 16:27
Reporternnmatveev Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Summary0000806: 'property_get' doesn't work if array key contains a whitespace
Description

subj

Steps To Reproduce

Consider the following code:
<?php
$x = array("a" => array(1, 2), "a b" => array(1, 2));
var_dump($x); //breakpoint here

It is impossible to get $x['a b'] content using 'property_get' command:
<- property_get -i 13 -n $x['a b'] -d 0 -c 0 -p 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="13"><error code="1"><message><![CDATA[parse error in command]]></message></error></response>

<- property_get -i 14 -n $x['a'] -d 0 -c 0 -p 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="14"><property name="$x['a']" fullname="$x['a']" address="38459768" type="array" children="1" numchildren="2" page="0" pagesize="100"><property name="0" fullname="$x['a'][0]" address="38459800" type="int"><![CDATA[1]]></property><property name="1" fullname="$x['a'][1]" address="38459832" type="int"><![CDATA[2]]></property></property></response>

Additional Information

Xdebug version: 2.1.4
PHP version: 5.3.5

related issue from PhpStorm issue tracker - http://youtrack.jetbrains.com/issue/WI-9471

TagsNo tags attached.
Operating SystemWindows 7
PHP Version5.3.5

Activities

derick

2012-04-07 16:27

administrator   ~0002030

This is not a bug. In order to use spaces in values you need to quote the value. This was not documented in the DBGp protocol unfortunately, but it is now:
http://xdebug.org/docs-dbgp.php#message-packets