mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Use zend_is_constructor()
This commit is contained in:
parent
408961987f
commit
45d1c38dab
1 changed files with 1 additions and 1 deletions
|
@ -5906,7 +5906,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, uint32_t fall
|
|||
zend_op_array *op_array = CG(active_op_array);
|
||||
zend_class_entry *scope = op_array->scope;
|
||||
zend_bool is_ctor =
|
||||
scope && zend_string_equals_literal_ci(op_array->function_name, "__construct");
|
||||
scope && zend_is_constructor(op_array->function_name);
|
||||
if (!is_ctor) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
"Cannot declare promoted property outside a constructor");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue