Skip to content

Commit

Permalink
Fixed bug #827: Enabling Xdebug causes phpt tests to fail because of …
Browse files Browse the repository at this point in the history
…var_dump() formatting issues.
  • Loading branch information
derickr committed May 7, 2012
1 parent 4e48d09 commit 4feb04b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/bug00280.phpt
Expand Up @@ -2,6 +2,7 @@
Test for bug #280: var_dump don't display key of array as expected
--INI--
xdebug.overload_var_dump=1
xdebug.default_enable=1
--FILE--
<?php
$var = "te\0st";
Expand Down
2 changes: 2 additions & 0 deletions tests/bug00298.phpt
@@ -1,5 +1,7 @@
--TEST--
Test for bug #298: xdebug_var_dump & multiline strings
--INI--
xdebug.default_enable=1
--FILE--
<?php
ini_set('html_errors', '1');
Expand Down
1 change: 1 addition & 0 deletions tests/bug00328.phpt
Expand Up @@ -2,6 +2,7 @@
Test for bug #328: Private properties are incorrectly enumerated in case of extended classes
--INI--
html_errors=1
xdebug.default_enable=1
--FILE--
<?php
class Daddy
Expand Down
1 change: 1 addition & 0 deletions tests/bug00684.phpt
Expand Up @@ -2,6 +2,7 @@
Test for bug #684: xdebug_var_dump - IE does not support &amp;
--INI--
html_errors=1
xdebug.default_enable=1
--FILE--
<?php
xdebug_var_dump('Testing isn\'t fun');
Expand Down
1 change: 1 addition & 0 deletions tests/bug00744.phpt
Expand Up @@ -3,6 +3,7 @@ Test for bug #744: new lines in a PHP file from Windows are displayed with an ex
--INI--
html_errors=1
xdebug.overload_var_dump=1
xdebug.default_enable=1
--FILE--
<?php
$my_test_string = 'hello
Expand Down
1 change: 1 addition & 0 deletions tests/vardump-overload-cli.phpt
Expand Up @@ -4,6 +4,7 @@ Test for overloaded var_dump() on the CLI
xdebug.overload_var_dump=1
html_errors=0
xdebug.cli_color=0
xdebug.default_enable=1
xdebug.var_display_max_data=32
xdebug.var_display_max_depth=2
xdebug.var_display_max_children=8
Expand Down
1 change: 1 addition & 0 deletions tests/xdebug_var_dump_limitations.phpt
Expand Up @@ -5,6 +5,7 @@ xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
html_errors=1
xdebug.default_enable=1
--FILE--
<?php
$array = array( 1, true, "string" );
Expand Down
1 change: 1 addition & 0 deletions tests/xdebug_var_dump_limitations_cli.phpt
Expand Up @@ -6,6 +6,7 @@ xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
xdebug.cli_color=0
html_errors=0
xdebug.default_enable=1
--FILE--
<?php
$array = array( 1, true, "string" );
Expand Down
5 changes: 4 additions & 1 deletion xdebug.c
Expand Up @@ -1599,7 +1599,10 @@ PHP_FUNCTION(xdebug_var_dump)
}

for (i = 0; i < argc; i++) {
if (PG(html_errors)) {
if (XG(default_enable) == 0) {
xdebug_php_var_dump(args[i], 1 TSRMLS_CC);
}
else if (PG(html_errors)) {
val = xdebug_get_zval_value_fancy(NULL, (zval*) *args[i], &len, 0, NULL TSRMLS_CC);
PHPWRITE(val, len);
xdfree(val);
Expand Down

0 comments on commit 4feb04b

Please sign in to comment.