| Anonymous | Login | Signup for a new account | 2013-05-20 20:43 BST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0000732 | Xdebug | Usage problems | public | 2011-10-09 14:03 | 2013-03-23 14:50 | ||||||
| Reporter | nnmatveev | ||||||||||
| Assigned To | derick | ||||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | 2.2.3 | Fixed in Version | |||||||||
| Summary | 0000732: 'property_get' command should accept integer array key surround with quotes | ||||||||||
| Description | 'property_get -i 11 -n $b[1] -d 0 -c 0 -p 0', will return a correct value, but 'property_get -i 11 -n $b['1'] -d 0 -c 0 -p 0' will return 'can not get property' | ||||||||||
| Additional Information | related issue from PhpStorm issue tracker - http://youtrack.jetbrains.net/issue/WI-6958 [^] | ||||||||||
| Tags | No tags attached. | ||||||||||
| Operating System | |||||||||||
| PHP Version | 5.3.5 | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0001838) nnmatveev (reporter) 2011-10-09 14:17 |
At the moment we need to manually check that expression is integer or not |
|
(0001839) nnmatveev (reporter) 2011-10-09 14:50 |
Another one related issue - http://youtrack.jetbrains.net/issue/WI-7864 [^] |
|
(0001840) derick (administrator) 2011-10-10 08:06 |
Why are you requesting it with quotes? None of the linked issues show me that Xdebug tells you there is a property key called '1'. |
|
(0001851) nnmatveev (reporter) 2011-10-25 00:35 |
@derick Ok, linked issues are not obvious.So, please look at log. Suppose you have array which contains another arrays as its children. $a -1:$child1 Eval of the expression '$a' will return you the following response: -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="eval" transaction_id="12"><property address="12642876" type="array" children="1" numchildren="1" page="0" pagesize="100"><property name="1" address="38266496" type="array" children="1" numchildren="1"></property></property></response> We can detect the child name only using the value of 'name' attribute. If I will try to get children content I will append this name as array key name: <- property_get -i 13 -n $GLOBALS['IDE_EVAL_CACHE']['dc4480db-4360-46d8-bc22-2d41f5455d7d']['1'] -d 0 -c 1 -p 0 But Xdebug will return me an error: -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="property_get" transaction_id="13" status="break" reason="ok"><error code="300"><message><![CDATA[can not get property]]></message></error></response> At the moment you need to wrap name with quotes when the key name is string, and don't wrap it when the key name is integer. |
|
(0001958) derick (administrator) 2012-03-07 19:55 |
Hmm, this is something we should fix in the protocol, by f.e. adding a name_type key. What do you think of that? |
|
(0001965) nnmatveev (reporter) 2012-03-11 05:22 |
But why Xdebug can't treat $arr['1'] and $arr[1] in the same way? PHP actually do that. |
|
(0002060) nnmatveev (reporter) 2012-04-18 16:56 |
derick, do I need to elaborate my question? |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-10-09 14:03 | nnmatveev | New Issue | |
| 2011-10-09 14:03 | nnmatveev | File Added: xdebug.log | |
| 2011-10-09 14:17 | nnmatveev | Note Added: 0001838 | |
| 2011-10-09 14:50 | nnmatveev | Note Added: 0001839 | |
| 2011-10-10 08:06 | derick | Note Added: 0001840 | |
| 2011-10-10 08:06 | derick | Assigned To | => derick |
| 2011-10-10 08:06 | derick | Status | new => feedback |
| 2011-10-25 00:35 | nnmatveev | Note Added: 0001851 | |
| 2011-10-25 00:35 | nnmatveev | Status | feedback => assigned |
| 2012-03-07 19:55 | derick | Note Added: 0001958 | |
| 2012-03-11 05:22 | nnmatveev | Note Added: 0001965 | |
| 2012-04-18 16:56 | nnmatveev | Note Added: 0002060 | |
| 2012-06-27 22:16 | derick | Target Version | => 2.2.1 |
| 2012-07-14 23:14 | derick | Target Version | 2.2.1 => 2.2.2 |
| 2013-03-23 14:50 | derick | Target Version | 2.2.2 => 2.2.3 |
| Copyright © 2000 - 2011 MantisBT Group |