com php-src: Also protects object to array cast: Zend/zend_op erators.c
| From: | Xinchen Hui | Date: | Mon, 21 Mar 2016 11:12:50 +0000 |
| Subject: | com php-src: Also protects object to array cast: Zend/zend_op erators.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91444@lists.php.net to get a copy of this message | ||
Commit: 9712a974beb53f47bcffb2c6554cc5c85d231fe2
Author: Xinchen Hui <laruence@gmail.com> Mon, 21 Mar 2016 19:12:50 +0800
Parents: a9a46f17be6c4460ab0ee785978d6e430ce96017
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9712a974beb53f47bcffb2c6554cc5c85d231fe2
Log:
Also protects object to array cast
Changed paths:
M Zend/zend_operators.c
Diff:
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 5cbe393..50557e5 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -597,7 +597,9 @@ try_again:
if (obj_ht) {
zval arr;
- if (!Z_OBJCE_P(op)->default_properties_count && obj_ht ==
Z_OBJ_P(op)->properties) {
+ if (!Z_OBJCE_P(op)->default_properties_count &&
+ obj_ht == Z_OBJ_P(op)->properties &&
+ !ZEND_HASH_GET_APPLY_COUNT(Z_OBJ_P(op)->properties)) {
/* fast copy */
if (EXPECTED(Z_OBJ_P(op)->handlers == &std_object_handlers)) {
ZVAL_ARR(&arr, obj_ht);