MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000744XdebugUsage problems (Wrong Results)public2011-11-02 10:222012-02-29 13:13
Reporteraarjan 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSLinuxOS VersionCentOS 5.3
Product Version2.1.0 
Target VersionFixed in Version 
Summary0000744: new lines in a PHP file from Windows are displayed with an extra white line with var_dump();
DescriptionThe next PHP code shows an empty line in the browser. This is because Windows stores a "Return" as a \r\l (0000013#10) and xdebug seems to replace only the \l

<?php
$my_test_string = 'hello
                    world';
                    
var_dump($my_test_string);
?>

Hexdump -C output:
00000000 3c 3f 70 68 70 0d 0a 0d 0a 24 6d 79 5f 74 65 73 |<?php....$my_tes|
00000010 74 5f 73 74 72 69 6e 67 20 3d 20 27 68 65 6c 6c |t_string = 'hell|
00000020 6f 0d 0a 09 09 09 09 09 77 6f 72 6c 64 27 3b 0d |o.......world';.|
00000030 0a 09 09 09 09 09 0d 0a 76 61 72 5f 64 75 6d 70 |........var_dump|
00000040 28 24 6d 79 5f 74 65 73 74 5f 73 74 72 69 6e 67 |($my_test_string|
00000050 29 3b 0d 0a 0d 0a 3f 3e |);....?>|
00000058

Html output (note that the "&0000010" is on a new line):
<pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000'>'hello
world'</font> (length=17)

Steps To ReproduceSee attached file
Additional InformationSaving the file in Unix-style (only \l) shows the proper output
TagsNo tags attached.
Operating System
PHP Version5.3.8
Attached Files? file icon xdebug_test.php [^] (88 bytes) 2011-11-02 10:22

- Relationships

-  Notes
(0001935)
derick (administrator)
2012-02-29 13:13

Fixed on github for 2.1.4 and 2.2.0.

- Issue History
Date Modified Username Field Change
2011-11-02 10:22 aarjan New Issue
2011-11-02 10:22 aarjan File Added: xdebug_test.php
2012-02-29 13:13 derick Note Added: 0001935
2012-02-29 13:13 derick Status new => closed
2012-02-29 13:13 derick Assigned To => derick
2012-02-29 13:13 derick Resolution open => fixed
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker