Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug #800: var_dump(get_class(new foo\bar')) add an extra "\" in…

… class name.
  • Loading branch information...
commit f026d624f1d5a0b26b2736637becb54b567d609d 1 parent 591f593
Derick Rethans authored June 27, 2012
18  tests/bug00800.phpt
... ...
@@ -0,0 +1,18 @@
  1
+--TEST--
  2
+Test for bug #800: var_dump(get_class(new foo\bar')) add an extra "\" in class name.
  3
+--SKIPIF--
  4
+<?php if (!version_compare(phpversion(), "5.3", '>=')) echo "skip >= PHP 5.3 needed\n"; ?>
  5
+--INI--
  6
+xdebug.default_enable=1
  7
+xdebug.overload_var_dump=1
  8
+--FILE--
  9
+<?php
  10
+
  11
+namespace foo;
  12
+
  13
+class bar {}
  14
+
  15
+var_dump(get_class(new bar));
  16
+?>
  17
+--EXPECT--
  18
+string(7) "foo\bar"
2  xdebug_var.c
@@ -704,7 +704,7 @@ void xdebug_var_export_text_ansi(zval **struc, xdebug_str *str, int mode, int le
704 704
 			break;
705 705
 
706 706
 		case IS_STRING:
707  
-			tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "\\\0..\37", 6 TSRMLS_CC);
  707
+			tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "\0..\37", 5 TSRMLS_CC);
708 708
 			if (options->no_decoration) {
709 709
 				xdebug_str_add(str, tmp_str, 0);
710 710
 			} else if (Z_STRLEN_PP(struc) <= options->max_data) {

0 notes on commit f026d62

Please sign in to comment.
Something went wrong with that request. Please try again.