com php-src: Fixed possible incorrect result of type verification.: Zend/zend_execute.c
| From: | Dmitry Stogov | Date: | Tue, 15 Aug 2017 11:46:18 +0000 |
| Subject: | com php-src: Fixed possible incorrect result of type verification.: Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99032@lists.php.net to get a copy of this message | ||
Commit: b096eacdd1a00d2b8a1511539dbe77851bf25150
Author: Dmitry Stogov <dmitry@zend.com> Tue, 15 Aug 2017 14:46:18 +0300
Parents: 389ea45b125155351769a32504aa9493f42fd839
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b096eacdd1a00d2b8a1511539dbe77851bf25150
Log:
Fixed possible incorrect result of type verification.
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index a78accf..ae9d006 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;
}