View Issue Details

IDProjectCategoryView StatusLast Update
0001515XdebugStep Debuggingpublic2018-01-22 18:21
Reporterderick Assigned Toderick  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.6.0beta1 
Target Version2.6.0Fixed in Version2.6.0rc1 
Summary0001515: Object property names with a NULL char are cut off at NULL char
Description

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

Steps To Reproduce

With this script:

<?php
$obj = new stdClass;
$name = "with-\0-null-char";
$obj->$name = 42;

die();
?>

The result is:

<?xml version="1.0" encoding="iso-8859-1"?>
<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///tmp/null.php" language="PHP" xdebug:language_version="7.2.0-dev" protocol_version="1.0" appid="25118" idekey="pr"><engine version="2.6.0beta2-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![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" 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" 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" command="step_into" transaction_id="3" status="break" reason="ok"><xdebug:message filename="file:///tmp/null.php" lineno="4"></xdebug:message></response>
(cmd) step_into -i 4
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="4" status="break" reason="ok"><xdebug:message filename="file:///tmp/null.php" lineno="6"></xdebug:message></response>
(cmd) context_get -i 5
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$name" fullname="$name" type="string" size="16" encoding="base64"><![CDATA[d2l0aC0ALW51bGwtY2hhcg==]]></property><property name="$obj" fullname="$obj" type="object" classname="stdClass" children="1" numchildren="1" page="0" pagesize="32"><property name="with-" fullname="$obj->with-" facet="public" type="int"><![CDATA[42]]></property></property></response>
(cmd) property_get -i 6 -n $obj
<?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="6"><property name="$obj" fullname="$obj" type="object" classname="stdClass" children="1" numchildren="1" page="0" pagesize="32"><property name="with-" fullname="$obj->with-" facet="public" type="int"><![CDATA[42]]></property></property></response>

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

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-01-10 15:25 derick New Issue
2018-01-16 23:18 derick Status new => closed
2018-01-16 23:18 derick Assigned To => derick
2018-01-16 23:18 derick Resolution open => fixed
2018-01-16 23:18 derick Fixed in Version => 2.6.0
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