From 30b14ee8e996913622f1bdaea239de14ef3a41d7 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 24 Aug 2005 16:19:57 +0000 Subject: MFH: Remainder of the 34191 bug fix. --- main/output.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main') diff --git a/main/output.c b/main/output.c index b197cb48b5..6880ada6a2 100644 --- a/main/output.c +++ b/main/output.c @@ -294,6 +294,9 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS OG(ob_nesting_level)--; if (send_buffer) { + if (just_flush) { /* if flush is called prior to proper end, ensure presence of NUL */ + final_buffer[final_buffer_length] = '\0'; + } OG(php_body_write)(final_buffer, final_buffer_length TSRMLS_CC); } -- cgit v1.2.1