#44394 [Opn->Csd]: Last two bytes missing from output
| From: | felipe@php.net | Date: | Wed, 12 Mar 2008 02:46:49 +0000 |
| Subject: | #44394 [Opn->Csd]: Last two bytes missing from output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123205@lists.php.net to get a copy of this message | ||
ID: 44394
Updated by: felipe@php.net
Reported By: weirdan at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Output Control
Operating System: Windows XP
PHP Version: 5.2.6RC2
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed in 5_3 and HEAD.
Previous Comments:
------------------------------------------------------------------------
[2008-03-11 22:31:42] weirdan at gmail dot com
not fixed on WinXP, tested with this script:
<?php
echo phpversion() . "\n";
$string = "<a href='a?q=1'>asd</a>";
output_add_rewrite_var('a', 'b');
echo $string;
ob_flush();
ob_end_clean();
Results:
C:\Windows\system32\cmd.exe /c .\php.exe q.php | more
5.2.6RC3-dev
<a href='a?q=1&a=b'>asd</
Hit any key to close this window...
------------------------------------------------------------------------
[2008-03-11 21:36:52] jani@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
------------------------------------------------------------------------
[2008-03-10 16:03:29] weirdan at gmail dot com
Description:
------------
It seems like a regression of http://bugs.php.net/bug.php?id=26862 -
two last bytes missing from output when using ob_flush() +
ob_end_clean(). ob_end_flush() works as expected though.
The same issue is observed on PHP 5.2.3 / Linux
Reproduce code:
---------------
<?php
$string = "<a href='a?q=1'>asd</a>";
output_add_rewrite_var('a', 'b');
echo $string;
ob_flush();
ob_end_clean();
Expected result:
----------------
<a href='a?q=1&a=b'>asd</a>
Actual result:
--------------
<a href='a?q=1&a=b'>asd</
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44394&edit=1