From: Nikita Popov Date: Sat, 15 Oct 2016 21:21:12 +0000 (+0200) Subject: Fix SplFixedArray::offsetGet() invocation for NULL offset X-Git-Tag: php-7.1.0RC4~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1903fc62988c476d26283aa1baeca86f9a0540af;p=php Fix SplFixedArray::offsetGet() invocation for NULL offset --- diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 741b1dbf14..88b3150404 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -349,7 +349,7 @@ static zval *spl_fixedarray_object_read_dimension(zval *object, zval *offset, in if (intern->fptr_offset_get) { zval tmp; if (!offset) { - ZVAL_UNDEF(&tmp); + ZVAL_NULL(&tmp); offset = &tmp; } else { SEPARATE_ARG_IF_REF(offset); diff --git a/ext/spl/tests/bug64106.phpt b/ext/spl/tests/bug64106.phpt index 855caef213..26203c4e2e 100644 --- a/ext/spl/tests/bug64106.phpt +++ b/ext/spl/tests/bug64106.phpt @@ -4,7 +4,7 @@ Bug #64106: Segfault on SplFixedArray[][x] = y when extended --EXPECTF-- +NULL + Notice: Indirect modification of overloaded element of MyFixedArray has no effect in %s on line %d