]> granicus.if.org Git - php/commit
Initialize SplFixedArray elements to NULL instead of UNDEF
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 30 Jan 2020 14:31:39 +0000 (15:31 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 30 Jan 2020 14:31:39 +0000 (15:31 +0100)
commitca8657a2b502791b1ec0587948741098ca82e314
tree3f8dd32912009a89e1b49f0b12952117bdabf91a
parentb33697d47e2e1d8a3a3827804695bcd9b42e400d
Initialize SplFixedArray elements to NULL instead of UNDEF

The SplFixedArray API treats all elements as NULL, even if they
have not been explicitly initialized. Rather than initializing
to UNDEF an treating that specially in various circumstances,
directly initialize elements to NULL.

This also fixes an assertion failure in the attached test case.
ext/spl/spl_fixedarray.c
ext/spl/tests/SplFixedArray_indirect_modification.phpt [new file with mode: 0644]