diff options
author | Zeev Suraski <zeev@php.net> | 2001-06-26 18:30:31 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-06-26 18:30:31 +0000 |
commit | f35b85b4c109c404ab4b12f1ad5f4af9cf5ac97f (patch) | |
tree | 8a7a9c768c84135e174a99ed7775779e541ae793 | |
parent | 81337038412628e6c6c2850a2c548916b3a29162 (diff) | |
download | php-git-f35b85b4c109c404ab4b12f1ad5f4af9cf5ac97f.tar.gz |
Fix bug #11678
-rw-r--r-- | ext/standard/output.c | 11 | ||||
-rw-r--r-- | main/output.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/ext/standard/output.c b/ext/standard/output.c index 26f95af2e4..cacf045a0c 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -540,7 +540,16 @@ PHP_FUNCTION(ob_start) 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; diff --git a/main/output.c b/main/output.c index 26f95af2e4..cacf045a0c 100644 --- a/main/output.c +++ b/main/output.c @@ -540,7 +540,16 @@ PHP_FUNCTION(ob_start) 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; |