summaryrefslogtreecommitdiff
path: root/main/output.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-10-03 13:32:01 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-10-03 13:32:01 +0000
commit39b0eb9b2219f3e1c5291f922ead1bb61b41c22e (patch)
treebd2ce03c77ac9c342ed4dc6bc45e1f9297755ac3 /main/output.c
parent76a104feb89c79fd5082ea820e2aa646446b37d2 (diff)
downloadphp-git-39b0eb9b2219f3e1c5291f922ead1bb61b41c22e.tar.gz
Fixed broken code by Derick.
ob_implicit_flush() and ob_flush_all() are stopped working. var_dump() and hightlisht_string() outputs buffer contents wrongly with ob_implicit_flush(). Everyone should be happy now. It was only OG(implicit_flush) interpretation issue after all.
Diffstat (limited to 'main/output.c')
-rw-r--r--main/output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/output.c b/main/output.c
index 39ff8d8c19..a644ba75df 100644
--- a/main/output.c
+++ b/main/output.c
@@ -591,10 +591,12 @@ static inline void php_ob_append(const char *text, uint text_length TSRMLS_DC)
memcpy(target, text, text_length);
target[text_length]=0;
- if (OG(active_ob_buffer).chunk_size
- && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) {
+ /* If implicit_flush is On, send contents to next buffer and return. */
+ if (OG(implicit_flush) || OG(active_ob_buffer).chunk_size
+ && OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size)
+ {
zval *output_handler = OG(active_ob_buffer).output_handler;
-
+
if (output_handler) {
output_handler->refcount++;
}