]> granicus.if.org Git - php/commitdiff
Use zend_is_constructor()
authormoliata <ben@moliata.com>
Wed, 17 Jun 2020 14:04:52 +0000 (17:04 +0300)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 17 Jun 2020 14:46:17 +0000 (16:46 +0200)
Zend/zend_compile.c

index 062ed8b025916e6e09b75fb7bb682029d888278f..a34b1d8bea99b01e525a2f7233354ee4e5efb8ba 100644 (file)
@@ -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");