View Issue Details

IDProjectCategoryView StatusLast Update
0000146Xdebug(No Category)public2005-09-23 09:24
Reportermariuszn3Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000146: xt trace files -> quotes within array key name's are not escaped
DescriptionWithin content of trace files (*.xt). Arrays presented as function parameters or returns has unescaped quotes within key names (values are fine). This doesn't affects xdebug extension but affects any software that makes use of that.
Additional InformationTrace file contains function returns and function paramaters in most cased presented as valid php code(with minor exceptions like for resource and class types).
I've just created script which parses that file and outputs that in more readable table way.
When with resource and class problem (of not valid php code) is easy to solve then in case of unescaped array key names it's more problematic and there's no perfect solution for that (I wrote short function to repair such file but apart of that it can be time consuming it's still not sound solution)
I will publish that script and mention about it on discussion list when I'll be happy about it. I'm still testing and improving it.
TagsNo tags attached.
Operating SystemWindows XP
PHP Version5.0.4

Activities

derick

2005-09-22 19:45

administrator   ~0000289

I can't reproduce this with the latest cvs version of Xdebug. The following script:

<?php
    $tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));

    function foo($a)
    {
        return $a;
    }

    $array = array("te\"st's" => 42);
    foo($array);

    echo file_get_contents($tf);
    unlink($tf);
?>

produces the following output:
TRACE START [2005-09-22 18:44:51]
    0.0011 44184 -> foo(array ('te"st\'s' => 42)) /dat/dev/php/xdebug/tests/bug00146.php:10
                           >=> array ('te"st\'s' => 42)
    0.0012 44240 -> file_get_contents('/tmp/xdt4332fba354c818.92692592.xt') /dat/dev/php/xdebug/tests/bug00146.php:12

as you can see, the quote (') is succesfully escaped.

Please provide a script where the trace file does not have this.

mariuszn3

2005-09-23 01:49

reporter   ~0000292

Last edited: 2005-09-23 01:59

Sorry my fault I was using 2.0.0beta1 version. I've just updated. Thanks!

edited on: 2005-09-23 02:59

derick

2005-09-23 09:24

administrator   ~0000294

Okay, considered "fixed" then.

Issue History

Date Modified Username Field Change
2005-09-03 00:12 mariuszn3 New Issue
2005-09-22 19:45 derick Note Added: 0000289
2005-09-22 19:45 derick Status new => feedback
2005-09-23 01:49 mariuszn3 Note Added: 0000292
2005-09-23 01:59 mariuszn3 Note Edited: 0000292
2005-09-23 09:24 derick Status feedback => resolved
2005-09-23 09:24 derick Resolution open => fixed
2005-09-23 09:24 derick Assigned To => derick
2005-09-23 09:24 derick Note Added: 0000294
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)