]> granicus.if.org Git - php/commitdiff
Removed __output_handler as everybody seems against such implicit
authorMarcus Boerger <helly@php.net>
Sun, 25 Aug 2002 14:20:37 +0000 (14:20 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 25 Aug 2002 14:20:37 +0000 (14:20 +0000)
behaviour. Instead supply error message.

main/output.c

index 6fa9ebc2da5f794f15d0ac2d066359d5bd876c54..503346ebd43ac14b64cca06dc189d35ff356c2e9 100644 (file)
@@ -534,24 +534,8 @@ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler,
                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) {