Skip to content

Commit 449bb05

Browse files
committed
Drop IS_CALLABLE_CHECK_SILENT flag
This flag was suppressing *some* but not all errors in zend_is_callable(), and is no longer used. You can avoid errors by omitting the error argument.
1 parent 485d3ac commit 449bb05

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3492,7 +3492,7 @@ static zend_always_inline bool zend_is_callable_check_func(int check_flags, zval
34923492
fcc->calling_scope = ce_org;
34933493
} else {
34943494
/* We already checked for plain function before. */
3495-
if (error && !(check_flags & IS_CALLABLE_CHECK_SILENT)) {
3495+
if (error) {
34963496
zend_spprintf(error, 0, "function \"%s\" not found or invalid function name", Z_STRVAL_P(callable));
34973497
}
34983498
return 0;
@@ -3610,7 +3610,7 @@ static zend_always_inline bool zend_is_callable_check_func(int check_flags, zval
36103610
}
36113611
}
36123612
}
3613-
} else if (error && !(check_flags & IS_CALLABLE_CHECK_SILENT)) {
3613+
} else if (error) {
36143614
if (fcc->calling_scope) {
36153615
if (error) zend_spprintf(error, 0, "class %s does not have a method \"%s\"", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(mname));
36163616
} else {

Zend/zend_API.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ ZEND_API zend_result zend_disable_class(const char *class_name, size_t class_nam
378378
ZEND_API ZEND_COLD void zend_wrong_param_count(void);
379379

380380
#define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0)
381-
#define IS_CALLABLE_CHECK_SILENT (1<<3)
382381

383382
ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc);
384383
ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object);

0 commit comments

Comments
 (0)