From: Nikita Popov Date: Fri, 6 Mar 2020 15:34:15 +0000 (+0100) Subject: Remove unnecessary uses of CHECK_SILENT X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=941a3b6ccdae528b633576fdffdda99b0eb48876;p=php Remove unnecessary uses of CHECK_SILENT If no error is passed, it is always silent. --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index f550614130..6f6fb59eca 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1011,7 +1011,7 @@ static zend_always_inline zend_bool zend_check_type_slow( builtin_types: type_mask = ZEND_TYPE_FULL_MASK(type); - if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) { + if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, 0, NULL)) { return 1; } if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 7fd91c7317..40d10e4255 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1184,7 +1184,7 @@ static zend_always_inline zend_bool zend_jit_verify_type_common(zval *arg, const builtin_types: type_mask = ZEND_TYPE_FULL_MASK(arg_info->type); - if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL)) { + if ((type_mask & MAY_BE_CALLABLE) && zend_is_callable(arg, 0, NULL)) { return 1; } if ((type_mask & MAY_BE_ITERABLE) && zend_is_iterable(arg)) { diff --git a/main/streams/userspace.c b/main/streams/userspace.c index dd6806d35f..ffdd0754e4 100644 --- a/main/streams/userspace.c +++ b/main/streams/userspace.c @@ -1000,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;