From: Tim Landscheidt Date: Fri, 19 Oct 2012 03:02:20 +0000 (+0000) Subject: Protect against Xdebug overloading var_dump(). X-Git-Tag: 1.31.0-rc.0~21950 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=f199ee31d4a1ce30abed2d2e2f373bb92cb1a381;p=lhc%2Fweb%2Fwiklou.git Protect against Xdebug overloading var_dump(). This fixes bug #36452. Change-Id: I0fc65af8c561b23daa5301a00706acb5b3f619dc --- diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e62eb80f11..fa60b4279f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -7022,9 +7022,9 @@ Parser hook: empty input !! result
-string(0) ""
-array(0) {
-}
+''
+array (
+)
 
!! end @@ -7036,8 +7036,8 @@ Parser hook: empty input using terminated empty elements !! result
 NULL
-array(0) {
-}
+array (
+)
 
!! end @@ -7049,8 +7049,8 @@ Parser hook: empty input using terminated empty elements (space before) !! result
 NULL
-array(0) {
-}
+array (
+)
 
!! end @@ -7061,9 +7061,9 @@ Parser hook: basic input input !! result
-string(5) "input"
-array(0) {
-}
+'input'
+array (
+)
 
!! end @@ -7075,9 +7075,9 @@ Parser hook: case insensitive input !! result
-string(5) "input"
-array(0) {
-}
+'input'
+array (
+)
 
!! end @@ -7089,9 +7089,9 @@ Parser hook: case insensitive, redux input !! result
-string(5) "input"
-array(0) {
-}
+'input'
+array (
+)
 
!! end @@ -7104,9 +7104,9 @@ noxml !! result
-string(5) ""
-array(0) {
-}
+''
+array (
+)
 
</tag> !! end @@ -7117,17 +7117,13 @@ Parser hook: basic arguments !! result
-string(0) ""
-array(4) {
-  ["width"]=>
-  string(3) "200"
-  ["height"]=>
-  string(3) "100"
-  ["depth"]=>
-  string(2) "50"
-  ["square"]=>
-  string(6) "square"
-}
+''
+array (
+  'width' => '200',
+  'height' => '100',
+  'depth' => '50',
+  'square' => 'square',
+)
 
!! end @@ -7138,11 +7134,10 @@ Parser hook: argument containing a forward slash (bug 5344) !! result
-string(0) ""
-array(1) {
-  ["filename"]=>
-  string(8) "/tmp/bla"
-}
+''
+array (
+  'filename' => '/tmp/bla',
+)
 
!! end @@ -7154,10 +7149,9 @@ Parser hook: empty input using terminated empty elements (bug 2374) !! result
 NULL
-array(1) {
-  ["foo"]=>
-  string(3) "bar"
-}
+array (
+  'foo' => 'bar',
+)
 
text !! end @@ -7172,16 +7166,12 @@ other stuff !! result
 NULL
-array(4) {
-  ["width"]=>
-  string(3) "200"
-  ["height"]=>
-  string(3) "100"
-  ["depth"]=>
-  string(2) "50"
-  ["square"]=>
-  string(6) "square"
-}
+array (
+  'width' => '200',
+  'height' => '100',
+  'depth' => '50',
+  'square' => 'square',
+)
 

other stuff </tag> diff --git a/tests/parser/parserTestsParserHook.php b/tests/parser/parserTestsParserHook.php index 24d852c5df..f01665c1d4 100644 --- a/tests/parser/parserTestsParserHook.php +++ b/tests/parser/parserTestsParserHook.php @@ -34,14 +34,10 @@ class ParserTestParserHook { } static function dumpHook( $in, $argv ) { - ob_start(); - var_dump( - $in, - $argv - ); - $ret = ob_get_clean(); - - return "

\n$ret
"; + return "
\n" .
+			   var_export( $in, true ) . "\n" .
+			   var_export( $argv, true ) . "\n" .
+			   "
"; } static function staticTagHook( $in, $argv, $parser ) {