[xdebug-dev] xdebug xdebug/xdebug_var.c xdebug/tests/bug00298.phpt - Fixed bug #298: xdebug_var_dump() doesn't handle entity replacements

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Fri, 20 Jul 2007 15:52:27 +0200

Date: Fri Jul 20 15:52:26 CEST 2007
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Fixed bug #298: xdebug_var_dump() doesn't handle entity replacements
  correctly concerning string length.

Modified files:
           xdebug/xdebug_var.c (version: 1.87)
Added files:
           xdebug/tests/bug00298.phpt (new version: 1.1)

[FILE: /xdebug/xdebug_var.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- xdebug/xdebug_var.c:1.86 Mon Jun 04 14:05:20 2007 GMT
+++ xdebug/xdebug_var.c Fri Jul 20 11:52:26 2007 GMT
@@ -1122,7 +1122,7 @@
                 tmp = php_str_to_str(tmp2, len, "'", 1, "&apos;", 6, &len);
                 efree(tmp2);
 
- tmp2 = php_str_to_str(tmp, len, "\n", 1, "&#10;", 5, newlen);
+ tmp2 = php_str_to_str(tmp, len, "\n", 1, "&#10;", 5, &len);
                 efree(tmp);
 
                 tmp = php_str_to_str(tmp2, len, "\0", 1, "&#0;", 4, newlen);

[FILE: /xdebug/tests/bug00298.phpt]

--TEST--
Test for bug #298: xdebug_var_dump & multiline strings,
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
<?php if(version_compare(zend_version(), "2.0.0-dev", '<')) echo "skip Zend Engine 2 needed\n"; ?>
--INI--
--FILE--
<?php
ini_set('html_errors', '1');
$sql = "select * \n table from \nwhere condition";
xdebug_var_dump($sql);
?>
--EXPECT--
<pre><small>string</small> <font color='#cc0000'>'select * &#10; table from &#10;where condition'</font> <i>(length=38)</i>
</pre>
Received on Fri Jul 20 2007 - 15:52:31 BST

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