com php-src: betterness: Zend/zend_execute.c

From: Date: Tue, 08 Mar 2016 17:31:19 +0000
Subject: com php-src: betterness: Zend/zend_execute.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95598@lists.php.net to get a copy of this message
Commit: abdde6e2ef1e99a3552a4b242988214a3c7e033d Author: Joe Watkins <krakjoe@php.net> Tue, 8 Mar 2016 17:31:19 +0000 Parents: 0825a9d995a140fb14410e3513adf9e81c684f3b Branches: typed_ref_properties Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=abdde6e2ef1e99a3552a4b242988214a3c7e033d Log: betterness Changed paths: M Zend/zend_execute.c Diff: diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index ebed2d7..033eebf 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -782,7 +782,7 @@ zend_bool zend_verify_property_type(zend_class_entry *scope, zend_string *name, zend_class_entry *pce = type_ce ? *type_ce : NULL; zend_string *resolved = runtime ? zend_resolve_property_type(type_name, scope) : type_name; - if (!pce) { + if (!pce && runtime) { pce = zend_lookup_class(resolved); if (type_ce) { @@ -790,7 +790,7 @@ zend_bool zend_verify_property_type(zend_class_entry *scope, zend_string *name, } } - if (Z_TYPE_P(property) != IS_OBJECT || !instanceof_function(pce, Z_OBJCE_P(property))) { + if (Z_TYPE_P(property) != IS_OBJECT || !runtime || !instanceof_function(pce, Z_OBJCE_P(property))) { if (runtime) { zend_throw_exception_ex(zend_ce_type_error, type, "Typed property %s::$%s must be an instance of %s, %s used",

« previous php.cvs (#95598) next »