diff options
Diffstat (limited to 'main/streams/userspace.c')
-rw-r--r-- | main/streams/userspace.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/main/streams/userspace.c b/main/streams/userspace.c index 9cf1580a35..ffdd0754e4 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1,7 +1,5 @@ /* +----------------------------------------------------------------------+ - | PHP Version 7 | - +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | @@ -500,7 +498,7 @@ PHP_FUNCTION(stream_wrapper_register) zend_long flags = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|l", &protocol, &classname, &flags) == FAILURE) { - RETURN_FALSE; + RETURN_THROWS(); } uwrap = (struct php_user_stream_wrapper *)ecalloc(1, sizeof(*uwrap)); @@ -525,7 +523,7 @@ PHP_FUNCTION(stream_wrapper_register) } } } else { - php_error_docref(NULL, E_WARNING, "class '%s' is undefined", ZSTR_VAL(classname)); + php_error_docref(NULL, E_WARNING, "Class '%s' is undefined", ZSTR_VAL(classname)); } zend_list_delete(rsrc); @@ -540,7 +538,7 @@ PHP_FUNCTION(stream_wrapper_unregister) zend_string *protocol; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &protocol) == FAILURE) { - RETURN_FALSE; + RETURN_THROWS(); } if (php_unregister_url_stream_wrapper_volatile(protocol) == FAILURE) { @@ -562,7 +560,7 @@ PHP_FUNCTION(stream_wrapper_restore) HashTable *global_wrapper_hash; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &protocol) == FAILURE) { - RETURN_FALSE; + RETURN_THROWS(); } global_wrapper_hash = php_stream_get_url_stream_wrappers_hash_global(); @@ -1002,7 +1000,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value case PHP_STREAM_TRUNCATE_SUPPORTED: if (zend_is_callable_ex(&func_name, Z_ISUNDEF(us->object)? NULL : Z_OBJ(us->object), - IS_CALLABLE_CHECK_SILENT, NULL, NULL, NULL)) + 0, NULL, NULL, NULL)) ret = PHP_STREAM_OPTION_RETURN_OK; else ret = PHP_STREAM_OPTION_RETURN_ERR; |