Skip to content

Commit 45d1c38

Browse files
moliatacmb69
moliata
authored andcommitted
Use zend_is_constructor()
1 parent 4089619 commit 45d1c38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5906,7 +5906,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall
59065906
zend_op_array *op_array = CG(active_op_array);
59075907
zend_class_entry *scope = op_array->scope;
59085908
zend_bool is_ctor =
5909-
scope && zend_string_equals_literal_ci(op_array->function_name, "__construct");
5909+
scope && zend_is_constructor(op_array->function_name);
59105910
if (!is_ctor) {
59115911
zend_error_noreturn(E_COMPILE_ERROR,
59125912
"Cannot declare promoted property outside a constructor");

0 commit comments

Comments
 (0)