From: Dmitry Stogov Date: Tue, 15 Aug 2017 11:46:18 +0000 (+0300) Subject: Fixed possible incorrect result of type verification. X-Git-Tag: php-7.2.0RC1~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b096eacdd1a00d2b8a1511539dbe77851bf25150;p=php Fixed possible incorrect result of type verification. --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a78accfb76..ae9d00684d 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -843,6 +843,7 @@ static zend_always_inline zend_bool zend_check_type( if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { return instanceof_function(Z_OBJCE_P(arg), *ce); } + return Z_TYPE_P(arg) == IS_NULL && (ZEND_TYPE_ALLOW_NULL(type) || (default_value && is_null_constant(scope, default_value))); } else if (EXPECTED(ZEND_TYPE_CODE(type) == Z_TYPE_P(arg))) { return 1; }