Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing test cases for #575 and #1323
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--TEST-- | ||
Test for bug #575: Dump super globals contents to error log | ||
--INI-- | ||
xdebug.default_enable=1 | ||
display_errors=0 | ||
log_errors=1 | ||
xdebug.force_display_errors=0 | ||
xdebug.force_error_reporting=E_ALL | ||
xdebug.collect_params=0 | ||
xdebug.dump.SERVER=* | ||
--FILE-- | ||
<?php | ||
ini_set('error_reporting', 0); | ||
|
||
trigger_error('six', E_USER_WARNING); | ||
trigger_error('seven'); | ||
strlen(); | ||
?> | ||
--EXPECTF-- | ||
PHP Warning: six in %sbug00575.php on line 4 | ||
PHP Stack trace: | ||
PHP 1. {main}() %sbug00575.php:0 | ||
PHP 2. trigger_error() %sbug00575.php:4 | ||
PHP | ||
PHP Dump $_SERVER%A | ||
PHP | ||
PHP Notice: seven in %sbug00575.php on line 5 | ||
PHP Stack trace: | ||
PHP 1. {main}() %sbug00575.php:0 | ||
PHP 2. trigger_error() %sbug00575.php:5 | ||
PHP | ||
PHP Dump $_SERVER%A | ||
PHP | ||
PHP Warning: %s in %sbug00575.php on line 6 | ||
PHP Stack trace: | ||
PHP 1. {main}() %sbug00575.php:0 | ||
PHP 2. strlen() %sbug00575.php:6 | ||
PHP | ||
PHP Dump $_SERVER%A | ||
PHP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--TEST-- | ||
Test for bug #1323: Add config option to enable full paths in trace output | ||
--INI-- | ||
html_errors=1 | ||
xdebug.default_enable=1 | ||
xdebug.file_link_format= | ||
--FILE-- | ||
<?php | ||
$formats = [ | ||
'...%s%n', | ||
'%n', | ||
'%p', | ||
'%a', | ||
'%f', | ||
'%', | ||
'', | ||
]; | ||
|
||
foreach ( $formats as $format ) | ||
{ | ||
ini_set( 'xdebug.filename_format', $format ); | ||
echo $i, "\n"; | ||
} | ||
|
||
?> | ||
--EXPECTF-- | ||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>.../bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>tests/bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%s/tests/bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%r(\/|\w:)%r%s/tests/bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'><b>:</b>0</td></tr> | ||
</table></font> | ||
|
||
<br /> | ||
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> | ||
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr> | ||
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr> | ||
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr> | ||
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>.../bug01323-1.php<b>:</b>0</td></tr> | ||
</table></font> |