From 215b5a7db8f6730a3570c6f621920b902ea5cc55 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 25 Jun 2019 18:26:56 +0300 Subject: [PATCH] Replace previosly checked conditions by ZEND_ASSERT() --- Zend/zend_inheritance.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index c57d061793..997f9a7935 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -398,16 +398,12 @@ static inheritance_status zend_do_perform_implementation_check( /* Checks for constructors only if they are declared in an interface, * or explicitly marked as abstract */ - if ((fe->common.fn_flags & ZEND_ACC_CTOR) + ZEND_ASSERT(!((fe->common.fn_flags & ZEND_ACC_CTOR) && ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0 - && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) { - return INHERITANCE_SUCCESS; - } + && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0))); /* If the prototype method is private do not enforce a signature */ - if (proto->common.fn_flags & ZEND_ACC_PRIVATE) { - return INHERITANCE_SUCCESS; - } + ZEND_ASSERT(!(proto->common.fn_flags & ZEND_ACC_PRIVATE)); /* check number of arguments */ if (proto->common.required_num_args < fe->common.required_num_args -- 2.50.1