summaryrefslogtreecommitdiff
path: root/ext/spl/spl_array.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-06-10 23:20:07 -0700
committerStanislav Malyshev <stas@php.net>2014-06-10 23:20:07 -0700
commit2ed66ed21c6258683084b209ca3da1dfef5370a1 (patch)
tree2743850d9e1f005fe5b2d1b3396648a84caadb08 /ext/spl/spl_array.c
parentebe6854dbc1c61b303f5adbec712741b1bdcae70 (diff)
parentf11bba492978cc83cbe731788942a312c77418c1 (diff)
downloadphp-git-2ed66ed21c6258683084b209ca3da1dfef5370a1.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fix bug #66127 (Segmentation fault with ArrayObject unset) 5.4.31 next
Diffstat (limited to 'ext/spl/spl_array.c')
-rw-r--r--ext/spl/spl_array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index f450e0b715..9e3848dbfb 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -402,7 +402,7 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval
/* When in a write context,
* ZE has to be fooled into thinking this is in a reference set
* by separating (if necessary) and returning as an is_ref=1 zval (even if refcount == 1) */
- if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) && !Z_ISREF_PP(ret)) {
+ if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) && !Z_ISREF_PP(ret) && ret != &EG(uninitialized_zval_ptr)) {
if (Z_REFCOUNT_PP(ret) > 1) {
zval *newval;