com php-src: delay check for constant/ast during compile: Zend/zend_API.c
| From: | Bob Weinand | Date: | Wed, 09 Mar 2016 13:12:43 +0000 |
| Subject: | com php-src: delay check for constant/ast during compile: Zend/zend_API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95585@lists.php.net to get a copy of this message | ||
Commit: 3f24be0516f711c33260bc61ca56f0ad7d832576
Author: Joe Watkins <krakjoe@php.net> Wed, 9 Mar 2016 13:12:43 +0000
Parents: 4e8988a45146d60ff2a8e9a1b284e63fdc11d752
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3f24be0516f711c33260bc61ca56f0ad7d832576
Log:
delay check for constant/ast during compile
Changed paths:
M Zend/zend_API.c
Diff:
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 0bdc370..6fa31e1 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -3630,8 +3630,14 @@ ZEND_API int zend_declare_typed_property(zend_class_entry *ce, zend_string
*name
type_name = ce->name;
}
- if (!zend_verify_property_type(ce, name, optional_type, type_name, NULL, property, 0)) {
- return FAILURE;
+ switch (Z_TYPE_P(property)) {
+ case IS_CONSTANT:
+ case IS_CONSTANT_AST:
+ break;
+
+ default: if (!zend_verify_property_type(ce, name, optional_type, type_name, NULL, property, 0))
{
+ return FAILURE;
+ }
}
}
}