Skip to content

Commit 580bae4

Browse files
morrisonlevinikic
authored andcommitted
Fix copy-and-paste bugs
1 parent f749448 commit 580bae4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
23512351
if (clone) {
23522352
clone->common.fn_flags |= ZEND_ACC_CLONE;
23532353
if (clone->common.fn_flags & ZEND_ACC_STATIC) {
2354-
zend_error(error_type, "Constructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(clone->common.function_name));
2354+
zend_error(error_type, "%s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(clone->common.function_name));
23552355
}
23562356
clone->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
23572357
}
@@ -2411,7 +2411,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
24112411
zend_error_noreturn(E_CORE_ERROR, "Destructor %s::%s() cannot declare a return type", ZSTR_VAL(scope->name), ZSTR_VAL(dtor->common.function_name));
24122412
}
24132413

2414-
if (clone && clone->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE && dtor->common.fn_flags & ZEND_ACC_DTOR) {
2414+
if (clone && (clone->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) {
24152415
zend_error_noreturn(E_CORE_ERROR, "%s::%s() cannot declare a return type", ZSTR_VAL(scope->name), ZSTR_VAL(clone->common.function_name));
24162416
}
24172417
efree((char*)lc_class_name);

Zend/zend_closures.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static void zend_closure_call_magic(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ {
244244
zval params[2];
245245

246246
memset(&fci, 0, sizeof(zend_fcall_info));
247-
memset(&fci, 0, sizeof(zend_fcall_info_cache));
247+
memset(&fcc, 0, sizeof(zend_fcall_info_cache));
248248

249249
fci.size = sizeof(zend_fcall_info);
250250
fci.retval = return_value;

0 commit comments

Comments
 (0)