View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001527 | Xdebug | Uncategorized | public | 2018-02-15 15:14 | 2018-02-18 15:35 |
Reporter | okriz | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 2.6.0 | ||||
Summary | 0001527: true shown as false in PhpStorm Debug->Variables view under UTF-8 Keys (array, stdClass) | ||||
Description | When inspecting a variable (array or stdClass) with UTF-8 key(s) in PhpStorm:
Discovered while inspecting json_decoded'ed structures containing German Umlauts | ||||
Steps To Reproduce | Test file will get attached | ||||
Additional Information | Tested and reproduced this behavior with: PhpStorm 2017.3 in combination with: PHP 7.2.0 (cli) (built: Dec 12 2017 17:02:58) ( NTS ) as well as: PhpStorm 2017.3.4 in combination with PHP 7.2.2 (cli) (built: Feb 14 2018 18:26:07) ( NTS ) Executed with: | ||||
Tags | No tags attached. | ||||
Attached Files | XDEBUG_TEST.php (422 bytes)
<?php $json = <<<'JSON' { "\u00fc": {"true": true, "false": false}, "ü2": {"true": true, "false": false}, "ue": {"true": true, "false": false}, "⻪": {"true": true, "false": false} } JSON; $jsonArray = json_decode($json, true); $jsonStdClass = json_decode($json, false); $t1 = $jsonArray["⻪"]["true"]; $t2 = $jsonArray["⻪"]["false"]; $t1_1 = true === $t1; $t2_1 = false === $t2; $breakHere = true; | ||||
Operating System | Mac OS X High Sierra 10.13.3 | ||||
PHP Version | 7.2.0-7.2.4 | ||||
|
I checked the xdebug.log remote log and it seems alright. Not sure what causes this strange behavior. Maybe it's on jetbrains - not sure how the different debug views are executed |
|
Hi, I can reproduce this with PhpStorm, but I also believe that's where the problem lies. The output in Xdebug for: property_get -i 44 -n "$jsonArray[\"ü2\"]" -d 0 -c 0 -p 0 returns (correctly): <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="44"><property type="array" children="1" numchildren="2" page="0" pagesize="100"><name encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl0=]]></name><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl0=]]></fullname><property name="true" type="bool"><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl1bInRydWUiXQ==]]></fullname><value encoding="base64"><![CDATA[MQ==]]></value></property><property name="false" type="bool"><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl1bImZhbHNlIl0=]]></fullname><value encoding="base64"><![CDATA[MA==]]></value></property></property></response> The values (<![CDATA[MQ==]]>) and (<![CDATA[MA==]]>) are "1" and "0" respectively, but PhpStorm shows them both as false in the UI. I filed the following ticket with them: https://youtrack.jetbrains.com/issue/WI-40762 And I'm closing this issue, as this is not a bug in Xdebug. Thanks for the detailed report! cheers, |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-15 15:14 | okriz | New Issue | |
2018-02-15 15:14 | okriz | File Added: XDEBUG_TEST.php | |
2018-02-15 15:15 | okriz | File Added: xdebug.log | |
2018-02-15 15:15 | okriz | File Added: Bildschirmfoto 2018-02-15 um 15.59.11.png | |
2018-02-15 15:16 | okriz | File Added: Bildschirmfoto 2018-02-15 um 15.59.39.png | |
2018-02-15 15:16 | okriz | File Added: Bildschirmfoto 2018-02-15 um 15.59.51.png | |
2018-02-15 15:16 | okriz | File Added: Bildschirmfoto 2018-02-15 um 16.00.04.png | |
2018-02-15 15:17 | okriz | File Added: Bildschirmfoto 2018-02-15 um 16.00.22.png | |
2018-02-15 15:18 | okriz | Note Added: 0004593 | |
2018-02-18 15:35 | derick | Note Added: 0004594 | |
2018-02-18 15:35 | derick | Status | new => resolved |
2018-02-18 15:35 | derick | Resolution | open => no change required |
2018-02-18 15:35 | derick | Assigned To | => derick |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |