summaryrefslogtreecommitdiff
path: root/ext/spl/spl_array.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-12-04 06:51:16 -0800
committerXinchen Hui <laruence@gmail.com>2015-12-04 06:51:16 -0800
commit311eb2b11e97336a4c82b43b2422a30d346e5679 (patch)
tree28c2baf40c67f8ed0037d658606f6ca1aeec55f4 /ext/spl/spl_array.c
parent7ac24aa661b9bc9983bb92a734e2c9993db147c5 (diff)
downloadphp-git-311eb2b11e97336a4c82b43b2422a30d346e5679.tar.gz
Missed one place
Diffstat (limited to 'ext/spl/spl_array.c')
-rw-r--r--ext/spl/spl_array.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index da572f09b9..3b704c7def 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -514,7 +514,8 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval
return;
}
- switch(Z_TYPE_P(offset)) {
+try_again:
+ switch (Z_TYPE_P(offset)) {
case IS_STRING:
ht = spl_array_get_hash_table(intern, 0);
if (ht->u.v.nApplyCount > 0) {
@@ -574,6 +575,9 @@ num_index:
zend_error(E_NOTICE,"Undefined offset: %pd", index);
}
break;
+ case IS_REFERENCE:
+ ZVAL_DEREF(offset);
+ goto try_again;
default:
zend_error(E_WARNING, "Illegal offset type");
return;