cvs: php4 /ext/standard output.c
| From: | Zeev Suraski | Date: | Tue, 26 Jun 2001 18:30:31 +0000 |
| Subject: | cvs: php4 /ext/standard output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6027@lists.php.net to get a copy of this message | ||
zeev Tue Jun 26 20:30:31 2001 EDT
Modified files:
/php4/ext/standard output.c
Log:
Fix bug #11678
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.59 php4/ext/standard/output.c:1.60
--- php4/ext/standard/output.c:1.59 Wed Jun 6 15:05:51 2001
+++ php4/ext/standard/output.c Tue Jun 26 20:30:31 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.59 2001/06/06 13:05:51 rasmus Exp $ */
+/* $Id: output.c,v 1.60 2001/06/26 18:30:31 zeev Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -540,7 +540,16 @@
break;
}
if (php_start_ob_buffer(output_handler, chunk_size)==FAILURE) {
- php_error(E_WARNING, "Cannot use output buffering in output buffering display
handlers");
+ SLS_FETCH();
+ OLS_FETCH();
+
+ if (SG(headers_sent) && !SG(request_info).headers_only) {
+ OG(php_body_write) = php_ub_body_write_no_header;
+ } else {
+ OG(php_body_write) = php_ub_body_write;
+ }
+ OG(nesting_level) = 0;
+ php_error(E_ERROR, "Cannot use output buffering in output buffering display handlers");
RETURN_FALSE;
}
RETURN_TRUE;