View Issue Details

IDProjectCategoryView StatusLast Update
0001514XdebugStep Debuggingpublic2018-01-22 18:21
Reporterderick Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.6.0beta1 
Target Version2.6.0Fixed in Version2.6.0rc1 
Summary0001514: (Root) Variable names with a NULL char are cut off at NULL char
Description

When debugging a script that contains a variable name with a chr(0) in it, Xdebug does only return the variable name partially

Steps To Reproduce

When debugging the following script:

<?php
$name = "with-\0-null-char";
$$name = 42;

die();
?>

The result:

<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; fileuri="file:///tmp/null.php" language="PHP" xdebug:language_version="7.2.0-dev" protocol_version="1.0" appid="25059" idekey="pr"><engine version="2.6.0beta2-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]>&lt;/url>&lt;copyright>&lt;![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>
(cmd) step_into -i 1
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file:///tmp/null.php" lineno="2"></xdebug:message></response>
(cmd) step_into -i 2
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="step_into" transaction_id="2" status="break" reason="ok"><xdebug:message filename="file:///tmp/null.php" lineno="3"></xdebug:message></response>
(cmd) step_into -i 3
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="step_into" transaction_id="3" status="break" reason="ok"><xdebug:message filename="file:///tmp/null.php" lineno="5"></xdebug:message></response>
(cmd) context_get -i 4
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug&quot; command="context_get" transaction_id="4" context="0"><property name="$name" fullname="$name" type="string" size="16" encoding="base64"><![CDATA[d2l0aC0ALW51bGwtY2hhcg==]]></property><property name="$with-" fullname="$with-" type="uninitialized"></property></response>
(cmd)

TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4

Activities

derick

2018-01-15 11:22

administrator   ~0004561

Reopening, as it doesn't show the value correctly yet.

Issue History

Date Modified Username Field Change
2018-01-10 15:22 derick New Issue
2018-01-14 00:33 derick Status new => closed
2018-01-14 00:33 derick Assigned To => derick
2018-01-14 00:33 derick Resolution open => fixed
2018-01-14 00:33 derick Fixed in Version => 2.6.0
2018-01-15 11:22 derick Note Added: 0004561
2018-01-15 11:22 derick Status closed => confirmed
2018-01-16 23:19 derick Status confirmed => closed
2018-01-22 18:21 derick Fixed in Version 2.6.0 => 2.6.0rc1
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging