> - ob_start (3)
> + ob_start (3) (Unable to reproduce - Moriyoshi)
I still see them here.
The segfault disappears when only valid output_handlers are
used (the second chunk of the patch achieves that). Unless
I'm missing something, there really is no purpose in
preserving output_handler at this location.
call_user_function_ex handles (a) strings and (b) arrays
only. If the zval contains something different, it is
invalid.
Zeev, any comment?
Index: output.c
===================================================================
RCS file: /repository/php4/main/output.c,v
retrieving revision 1.142.2.8
diff -u -r1.142.2.8 output.c
--- output.c 3 Apr 2003 00:51:14 -0000 1.142.2.8
+++ output.c 3 Apr 2003 15:45:51 -0000
@@ -150,7 +150,7 @@
php_error_docref("ref.outcontrol" TSRMLS_CC, E_ERROR, "Cannot use
output buffering in output buffering display handlers");
return FAILURE;
}
- if (chunk_size) {
+ if (chunk_size > 0) {
if (chunk_size==1) {
chunk_size = 4096;
}
@@ -498,10 +498,7 @@
php_error_docref(NULL TSRMLS_CC, E_ERROR, "No method name given: use
ob_start(array($object,'method')) to specify instance $object and the name of a method
of class %s to use as output handler", Z_OBJCE_P(output_handler)->name);
result = FAILURE;
} else {
- if (output_handler) {
- SEPARATE_ZVAL(&output_handler);
- }
- result = php_ob_init_named(initial_size, block_size,
OB_DEFAULT_HANDLER_NAME, output_handler, chunk_size, erase TSRMLS_CC);
+ result = php_ob_init_named(initial_size, block_size,
OB_DEFAULT_HANDLER_NAME, NULL, chunk_size, erase TSRMLS_CC);
}
return result;
}
@@ -722,6 +719,9 @@
RETURN_FALSE;
}
+ if (chunk_size < 0)
+ chunk_size = 0;
+
if (php_start_ob_buffer(output_handler, chunk_size, erase TSRMLS_CC)==FAILURE)
{
RETURN_FALSE;
}
- Sascha
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php