davidc Fri Feb 13 11:48:17 2009 UTC
Added files: (Branch: PHP_5_3)
/php-src/tests/output bug46897.phpt
Modified files:
/php-src/main output.c
Log:
- Fixed bug #46897: ob_flush() should fail to flush unerasable buffers
- Added test for bug46897
- A memleak has been identified while fixing this bug but the changes
made by this commit do not affect ob_get_clean where the memleak (which
is fixed in HEAD with the new handler) resides.
- [DOC] New noticed is outputted in ob_flush when the buffer is unerasable
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.11&r2=1.167.2.3.2.4.2.12&diff_format=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.167.2.3.2.4.2.11
php-src/main/output.c:1.167.2.3.2.4.2.12
--- php-src/main/output.c:1.167.2.3.2.4.2.11 Wed Jan 7 18:34:18 2009
+++ php-src/main/output.c Fri Feb 13 11:48:17 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.167.2.3.2.4.2.11 2009/01/07 18:34:18 felipe Exp $ */
+/* $Id: output.c,v 1.167.2.3.2.4.2.12 2009/02/13 11:48:17 davidc Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -774,6 +774,11 @@
RETURN_FALSE;
}
+ if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed
to flush buffer %s.", OG(active_ob_buffer).handler_name);
+ RETURN_FALSE;
+ }
+
php_end_ob_buffer(1, 1 TSRMLS_CC);
RETURN_TRUE;
}
http://cvs.php.net/viewvc.cgi/php-src/tests/output/bug46897.phpt?view=markup&rev=1.1
Index: php-src/tests/output/bug46897.phpt
+++ php-src/tests/output/bug46897.phpt