diff options
author | Marcus Boerger <helly@php.net> | 2002-08-25 14:20:37 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-08-25 14:20:37 +0000 |
commit | 8638bb882f71111a46f391b074a91e5905521dc7 (patch) | |
tree | 94f9b8db3033df12c59ac51023a2bab6ca1fa5af | |
parent | ba45e2ea584a2c1cafe2e09ea91da91ac0adc2a7 (diff) | |
download | php-git-8638bb882f71111a46f391b074a91e5905521dc7.tar.gz |
Removed __output_handler as everybody seems against such implicit
behaviour. Instead supply error message.
-rw-r--r-- | main/output.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/main/output.c b/main/output.c index 6fa9ebc2da..503346ebd4 100644 --- a/main/output.c +++ b/main/output.c @@ -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) { |