From ee4ebab5a979c3245a7c3c257e9b123606a5793c Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 29 Jun 2023 09:34:03 +0200 Subject: [PATCH] [skip ci] Improve inheritance checked comment zend_can_early_bind() might have already detected that the methods are incompatible. In that case the class is still early bound, but must compile error when inheritance is performed. Thus it is only safe to skip compatibility checks when zend_can_early_bind() has succeeded. --- Zend/zend_inheritance.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 5276656f9e2..fb3623fdc41 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -1066,9 +1066,8 @@ static void perform_delayable_implementation_check( } /** - * @param check_only Set to false to throw compile errors on incompatible methods, or true to return - * INHERITANCE_ERROR. - * @param checked Whether the compatibility check has already been performed by zend_can_early_bind(). + * @param check_only Set to false to throw compile errors on incompatible methods, or true to return INHERITANCE_ERROR. + * @param checked Whether the compatibility check has already succeeded in zend_can_early_bind(). */ static zend_always_inline inheritance_status do_inheritance_check_on_method_ex( zend_function *child, zend_class_entry *child_scope,