View Issue Details

IDProjectCategoryView StatusLast Update
0000229XdebugUncategorizedpublic2006-12-19 18:58
Reporterd_kelsey Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Summary0000229: Cannot change a string to one which has spaces in it.
DescriptionI attempt to change a variable containing a string (the string is arbitrary) using the property_set request to a string which contains spaces, but it fails. I can change the string to anything else so long as it has no spaces in it.

eg I have a string with the contents "Welcome to PHP", and I tried to change it to "This is", but it is rejected. The command issued is

property_set -i 189 -n $b -d 0 -l 12 -- VGhpcyBpcw==

<?xml version="1.0" encoding="iso-8859-1"?>
<response command="property_set" transaction_id="189" success="0"></response>


If I change it to "ThisIsI" then the command is
property_set -i 193 -n $b -d 0 -l 12 -- VGhpc0lzSQ==

<?xml version="1.0" encoding="iso-8859-1"?>
<response command="property_set" transaction_id="193" success="1"></response>

I have checked that the base64 encoding decodes correctly to a string with spaces.
Additional InformationI have also tested this with 2.0.0rc2-dev built on 11th Dec 06 and the problem exists there as well.
TagsNo tags attached.
Operating System
PHP Version5.1.6

Activities

derick

2006-12-12 22:28

administrator   ~0000520

Although property_set still needs some work, this is expected behavior. Send the variable with quotes around it and it will work just fine. Basically, Xdebug does internally:

$cmd = sprintf("%s = %s", $name, $data);
eval($cmd);

where $name is the -n option and $data the -- option. As you can see that without the "'s, the eval command is not valid. I will keep this report open though as a reminder to properly implement property_set.

d_kelsey

2006-12-13 18:24

reporter   ~0000521

Thanks Derick, I have changed my client as you suggest and it works fine.

derick

2006-12-19 18:58

administrator   ~0000522

That has been fixed in CVS now. If you use the -t argument Xdebug will *not* use eval, but install just set the variable. You don't need to escape strings with " then any more. Only in case where the -t argument is missing Xdebug will use eval() internally to set the property.

Issue History

Date Modified Username Field Change
2006-12-12 15:59 d_kelsey New Issue
2006-12-12 22:28 derick Note Added: 0000520
2006-12-12 22:28 derick Assigned To => derick
2006-12-12 22:28 derick Status new => assigned
2006-12-13 18:24 d_kelsey Note Added: 0000521
2006-12-19 18:58 derick Status assigned => closed
2006-12-19 18:58 derick Note Added: 0000522
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