diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-01 03:05:50 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-01 03:05:50 +0000 |
commit | 82a8d372e5fcbee52769f2c376fad34fec4bf63e (patch) | |
tree | e43c8ad75de35a270e87f87067a379f39c4cf6db /main/main.c | |
parent | 28c5d0f0458304fe6048318567ced2c4610bce19 (diff) | |
download | php-git-82a8d372e5fcbee52769f2c376fad34fec4bf63e.tar.gz |
Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)
Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.
php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.
Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.
Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.
@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@ buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@ deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@ functions return TRUE for success, FALSE for failure. (Yasuo)
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/main/main.c b/main/main.c index e09e9765e7..069288efc2 100644 --- a/main/main.c +++ b/main/main.c @@ -669,14 +669,17 @@ int php_request_startup(TSRMLS_D) Z_STRLEN_P(output_handler) = strlen(PG(output_handler)); /* this can be optimized */ Z_STRVAL_P(output_handler) = estrndup(PG(output_handler), Z_STRLEN_P(output_handler)); Z_TYPE_P(output_handler) = IS_STRING; - php_start_ob_buffer(output_handler, 0 TSRMLS_CC); - } else if (PG(output_buffering)) { + php_start_ob_buffer(output_handler, 0, 1 TSRMLS_CC); + } + else if (PG(output_buffering)) { if (PG(output_buffering)>1) { - php_start_ob_buffer(NULL, PG(output_buffering) TSRMLS_CC); - } else { - php_start_ob_buffer(NULL, 0 TSRMLS_CC); + php_start_ob_buffer(NULL, PG(output_buffering), 1 TSRMLS_CC); } - } else if (PG(implicit_flush)) { + else { + php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC); + } + } + else if (PG(implicit_flush)) { php_start_implicit_flush(TSRMLS_C); } |