[xdebug-dev] Bug 0000146: xt trace files -> quotes within array key name's are not escaped

From: <xdebug-dev[@]lists.xdebug.org>
Date: Thu, 22 Sep 2005 20:45:56 +0200

A BUGNOTE has been added to this bug.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000146
======================================================================
Reporter: mariuszn3
Handler:
======================================================================
Project: Xdebug
Bug ID: 146
Category: Debug client (console)
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Operating System: Windows XP
PHP Version: 5.0.4
Xdebug Version: 2.0.0beta2
======================================================================
Date Submitted: 2005-09-03 01:12 CEST
Last Modified: 2005-09-22 20:45 CEST
======================================================================
Summary: xt trace files -> quotes within array key name's are not escaped
Description:
Within 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.

======================================================================

----------------------------------------------------------------------
 derick - 2005-09-22 20:45 CEST
----------------------------------------------------------------------
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.

Bug History
Date Modified Username Field Change
======================================================================
2005-09-03 01:12mariuszn3 New Bug
2005-09-03 01:12mariuszn3 Bug Monitored: mariuszn3
2005-09-22 20:45derick Bugnote Added: 0000289
======================================================================
Received on Thu Sep 22 2005 - 20:45:59 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST