View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000978 | Xdebug | Uncategorized | public | 2013-09-20 12:36 | 2013-10-09 18:31 |
| Reporter | aik099 | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.2.3 | ||||
| Summary | 0000978: Inspection of array with negative keys fails | ||||
| Description | I'm using xdebug with PhpStorm. I'm debugging a form submit, where I have following input fields: <input type="text" name="data[-1][FieldName1]" value="1"/> If I then try to inspect "data" variable, then I'm getting "can not get property" error instead of array content (see attached image). However if I try to add watch directly to "data[-1]" variable then I can see actual array content. | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 5.4.10-5.4.14 | ||||
|
|
Hi, Can you provide a log as made through xdebug.remote_log? Then I can see what PhpStorm actually sends to Xdebug. See http://xdebug.org/docs/remote#remote_log cheers, |
|
|
I've attached the log. Here might be the problematic piece of it (where getting value from negative array key): <- property_get -i 30 -n $items_info[-1] -d 0 -c 0 -p 0 Another piece tells, that problematic array, stored in $items_info variable is properly scanned and -1 key is discovered, as long as a fact, that $items_info[-1] is an array with 16 keys in it: <property name="$items_info" fullname="$items_info" address="21508632" type="array" children="1" numchildren="1" page="0" pagesize="100"><property name="-1" fullname="$items_info[-1]" address="21506624" type="array" children="1" numchildren="16"></property></property> This seems to be a correct $items_info[-1] array content, when queried from Watches panel of PhpStorm: <- eval -i 33 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJ2U2YWQ5NDE0LWYzN2ItNDhmMi1hZWNkLWQ4MjRjMGFkOTc0MyddPShpc3NldCgkaXRlbXNfaW5mbykpPygkaXRlbXNfaW5mb1stMV0pOiJJREVfRVZBTF9FUlIi P.S. |
|
|
I've also reported that issue to PhpStorm (http://youtrack.jetbrains.com/issue/WI-20158), when I was reporting this issue, since I wasn't sure where the bug is. |
|
|
Fixed for Xdebug 2.2.4. |