mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
14 lines
283 B
PHP
14 lines
283 B
PHP
--TEST--
|
|
SplFixedArray indirect modification notice
|
|
--FILE--
|
|
<?php
|
|
$a = new SplFixedArray(1);
|
|
$a[0][] = 3;
|
|
var_dump($a);
|
|
?>
|
|
--EXPECTF--
|
|
Notice: Indirect modification of overloaded element of SplFixedArray has no effect in %s on line %d
|
|
object(SplFixedArray)#1 (1) {
|
|
[0]=>
|
|
NULL
|
|
}
|