#41773 [Opn->Fbk]: php_strip_whitespace sends headers with errors suppressed
| From: | sniper@php.net | Date: | Sun, 24 Jun 2007 22:53:14 +0000 |
| Subject: | #41773 [Opn->Fbk]: php_strip_whitespace sends headers with errors suppressed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114136@lists.php.net to get a copy of this message | ||
ID: 41773
Updated by: sniper@php.net
Reported By: andi at splitbrain dot org
-Status: Open
+Status: Feedback
Bug Type: Output Control
Operating System: Linux (Debian unstable)
PHP Version: 5.2.4-dev (200706222030)
New Comment:
Did this work in 5.2.2 as you expected?
Previous Comments:
------------------------------------------------------------------------
[2007-06-24 16:50:01] andi at splitbrain dot org
Error suppression should suppress all output including sending headers.
This is crucial when cookies need to be sent later in the code. Please
note that this behavior broke in 5.2.3 and was working fine before
(breaking existing code).
------------------------------------------------------------------------
[2007-06-24 16:30:59] sniper@php.net
And why shouldn't the headers be sent? You're not getting any fatal
error there..
------------------------------------------------------------------------
[2007-06-22 22:29:10] andi at splitbrain dot org
Its still the same with the snapshot you linked.
------------------------------------------------------------------------
[2007-06-21 22:30:56] johannes@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
------------------------------------------------------------------------
[2007-06-21 22:16:48] andi at splitbrain dot org
Description:
------------
When suppressing error output of php_strip_whitespace and trying to
load a non existent file, output is started. The code below prints "not
sent" on older PHP versions but prints "sent" on PHP 5.2.3-1
Reproduce code:
---------------
<?php
$foo = @php_strip_whitespace('non existent file');
if(headers_sent()){
echo "sent\n";
}else{
echo "not sent\n";
}
Expected result:
----------------
not sent
Actual result:
--------------
sent
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41773&edit=1