summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-03-26 18:07:31 +0400
committerDmitry Stogov <dmitry@zend.com>2014-03-26 18:07:31 +0400
commit887189ca31eeac5f1f7dbcaf54405de0dc432f2d (patch)
tree8536fb10f33fe14c6b9357a587374a276f509399 /Zend/zend_variables.c
parente82f112468bc8c46e5cb006850634aa780e8e68d (diff)
downloadphp-git-887189ca31eeac5f1f7dbcaf54405de0dc432f2d.tar.gz
Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index f7375edc5e..4a7fb4f74a 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -336,6 +336,18 @@ ZEND_API int zval_copy_static_var(zval *p TSRMLS_DC, int num_args, va_list args,
zend_error(E_NOTICE,"Undefined variable: %s", key->key->val);
}
} else {
+ if (Z_TYPE_P(p) == IS_INDIRECT) {
+ p = Z_INDIRECT_P(p);
+ if (Z_TYPE_P(p) == IS_UNDEF) {
+ if (!is_ref) {
+ zend_error(E_NOTICE,"Undefined variable: %s", key->key->val);
+ p = &tmp;
+ ZVAL_NULL(&tmp);
+ } else {
+ ZVAL_NULL(p);
+ }
+ }
+ }
if (is_ref) {
SEPARATE_ZVAL_TO_MAKE_IS_REF(p);
Z_ADDREF_P(p);