View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000732 | Xdebug | Uncategorized | public | 2011-10-09 13:03 | 2013-06-04 15:16 |
Reporter | nnmatveev | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
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 | ||||
Additional Information | related issue from PhpStorm issue tracker - http://youtrack.jetbrains.net/issue/WI-6958 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | |||||
PHP Version | 5.3.5 | ||||
|
At the moment we need to manually check that expression is integer or not |
|
Another one related issue - http://youtrack.jetbrains.net/issue/WI-7864 |
|
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'. |
|
@derick Suppose you have array which contains another arrays as its children. Eval of the expression '$a' will return you the following response: We can detect the child name only using the value of 'name' attribute. But Xdebug will return me an error: 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. |
|
Hmm, this is something we should fix in the protocol, by f.e. adding a name_type key. What do you think of that? |
|
But why Xdebug can't treat $arr['1'] and $arr[1] in the same way? PHP actually do that. |
|
derick, do I need to elaborate my question? |
|
I had another good look at this, and although I understand what you're wanting I am going to have to decline it. Running eval on a property should be avoided, I think i have mentioned this before already. Eval can return a structure, but because the result is just PHP variable content (ie, there is no associated property name), the resulting property only contains the "name" attribute. This attribute is only meant for display purposes and not for contructing further property_get commands. If you would use a real property_get with a property name, then the resulting property structure will have for each element an extra attribute called full_name. This attribute's value is meant to be fed back to property_get and will include the full correct qualification for keys - including quotes around strings and excluding quotes around numbers. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-10-09 13:03 | nnmatveev | New Issue | |
2011-10-09 13:03 | nnmatveev | File Added: xdebug.log | |
2011-10-09 13:17 | nnmatveev | Note Added: 0001838 | |
2011-10-09 13:50 | nnmatveev | Note Added: 0001839 | |
2011-10-10 07:06 | derick | Note Added: 0001840 | |
2011-10-10 07:06 | derick | Assigned To | => derick |
2011-10-10 07:06 | derick | Status | new => feedback |
2011-10-24 23:35 | nnmatveev | Note Added: 0001851 | |
2011-10-24 23: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 15:56 | nnmatveev | Note Added: 0002060 | |
2012-06-27 21:16 | derick | Target Version | => 2.2.1 |
2012-07-14 22:14 | derick | Target Version | 2.2.1 => 2.2.2 |
2013-03-23 14:50 | derick | Target Version | 2.2.2 => 2.2.3 |
2013-05-22 03:51 | derick | Target Version | 2.2.3 => 2.2.x |
2013-05-24 04:31 | derick | Note Added: 0002491 | |
2013-05-24 04:31 | derick | Status | assigned => resolved |
2013-05-24 04:31 | derick | Resolution | open => won't fix |
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 |