View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000681 | Xdebug | Uncategorized | public | 2011-04-15 00:52 | 2011-09-19 21:17 |
Reporter | sergey.shymko | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Summary | 0000681: The recording of headers is broken in 2.1.1 | ||||
Description | Xdebug 2.1.0beta1 introduced a feature of "the recording of headers being set in scripts". Prior to Xdebug 2.1.1 it suppressed "headers already sent" PHP warning and recorded all headers even if output occur in scripts (at least in CLI mode). Starting from Xdebug 2.1.1 it no longer prevents getting "headers already sent" PHP warning. Actually, we were using this feature of Xdebug to be able to test headers with PHPUnit. And it was very helpful. What are you going to decide to be an expected behavior? | ||||
Steps To Reproduce | prepare sample PHP script (test.php):<?php error_reporting(-1); echo '!!!'; header('Content-Type: text/plain'); enable Xdebug 2.1.0 in php.inirun sample script from the command line:
enable Xdebug 2.1.1 in php.inirun sample script from the command line:
Warning: Cannot modify header information - headers already sent by (output started at test.php:3) in test.php on line 5 Call Stack: | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 5.3.5 | ||||
|
I just noticed this change, after upgrading from 2.1.0 to 2.1.1. A simple test is: It prints " true" if xdebug is off, or xdebug 2.1.1 is on. And it prints " false" if xdebug 2.1.0 is on. It would be nice to have an option to preserve this behavior in future versions of xdebug. |
|
Actually, if to investigate and think more deeply, the behavior of the latest xDebug versions seems to be correct, extension should not affect the language behavior. So, it's not a bug. |
|
Indeed Sergey, it was broken in Xdebug 2.1.0 really. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-04-15 00:52 | sergey.shymko | New Issue | |
2011-08-23 00:28 | jweber | Note Added: 0001793 | |
2011-08-29 20:26 | sergey.shymko | Note Added: 0001795 | |
2011-09-19 21:17 | derick | Note Added: 0001802 | |
2011-09-19 21:17 | derick | Status | new => resolved |
2011-09-19 21:17 | derick | Resolution | open => no change required |
2011-09-19 21:17 | derick | Assigned To | => derick |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |