cvs: php4 /main output.c

From: Date: Sun, 25 Aug 2002 14:20:38 +0000
Subject: cvs: php4 /main output.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13666@lists.php.net to get a copy of this message
helly Sun Aug 25 10:20:38 2002 EDT Modified files: /php4/main output.c Log: Removed __output_handler as everybody seems against such implicit behaviour. Instead supply error message. Index: php4/main/output.c diff -u php4/main/output.c:1.118 php4/main/output.c:1.119 --- php4/main/output.c:1.118 Sun Aug 25 08:16:48 2002 +++ php4/main/output.c Sun Aug 25 10:20:37 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.118 2002/08/25 12:16:48 helly Exp $ */ +/* $Id: output.c,v 1.119 2002/08/25 14:20:37 helly Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -534,24 +534,8 @@ result = result ? SUCCESS : FAILURE; } else if (output_handler && output_handler->type == IS_OBJECT) { - /* use __output_handler if only an object is given */ - zval *object_method; - - MAKE_STD_ZVAL(object_method); - if (array_init(object_method) != FAILURE) { - add_next_index_zval(object_method, output_handler); - add_next_index_string(object_method, "__output_handler", 1); - if (zend_is_callable(object_method, 1, &handler_name)) { - object_method->refcount++; - result = php_ob_init_named(initial_size, block_size, handler_name, object_method, chunk_size, erase TSRMLS_CC); - efree(handler_name); - result = result ? SUCCESS : FAILURE; - } else { - result = FAILURE; - } - } else { - result = FAILURE; - } + 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) {

« previous php.cvs (#13666) next »