diff --git a/Zend/zend_API.c b/Zend/zend_API.c index a066f657f3b80..3e9aaed418095 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2749,7 +2749,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend if (ptr->flags) { if (!(ptr->flags & ZEND_ACC_PPP_MASK)) { if (ptr->flags != ZEND_ACC_DEPRECATED && scope) { - zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? ZSTR_VAL(scope->name) : "", scope ? "::" : "", ptr->fname); + zend_error(error_type, "Invalid access level for %s::%s() - access must be exactly one of public, protected or private", ZSTR_VAL(scope->name), ptr->fname); } internal_function->fn_flags = ZEND_ACC_PUBLIC | ptr->flags; } else { @@ -3797,9 +3797,9 @@ static zend_always_inline bool zend_is_callable_check_func(zval *callable, zend_ } } else if (error) { if (fcc->calling_scope) { - if (error) zend_spprintf(error, 0, "class %s does not have a method \"%s\"", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(mname)); + zend_spprintf(error, 0, "class %s does not have a method \"%s\"", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(mname)); } else { - if (error) zend_spprintf(error, 0, "function %s() does not exist", ZSTR_VAL(mname)); + zend_spprintf(error, 0, "function %s() does not exist", ZSTR_VAL(mname)); } } zend_string_release_ex(lmname, 0); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a2d7e8f2aaf20..e15469c539e95 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3365,11 +3365,9 @@ static zend_never_inline zend_result zend_fetch_static_property_address_ex(zval } *retval = zend_std_get_static_property_with_info(ce, name, fetch_type, &property_info); - if (UNEXPECTED(op1_type != IS_CONST)) { - zend_tmp_string_release(tmp_name); + zend_tmp_string_release(tmp_name); - FREE_OP(op1_type, opline->op1.var); - } + FREE_OP(op1_type, opline->op1.var); } if (UNEXPECTED(*retval == NULL)) { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index efdebc6498a0e..c279cdc3caff5 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1115,7 +1115,7 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, zend_string * if (key) { lc_name = key; } else { - if (name == NULL || !ZSTR_LEN(name)) { + if (!ZSTR_LEN(name)) { return NULL; }