From 1b58bd39a637e9ec4ea9e95903b74aefdbd1b596 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 24 Feb 2013 12:55:46 +0800 Subject: Fixed bug #64264 (SPLFixedArray toArray problem) --- ext/spl/tests/bug64264.phpt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ext/spl/tests/bug64264.phpt (limited to 'ext/spl/tests') diff --git a/ext/spl/tests/bug64264.phpt b/ext/spl/tests/bug64264.phpt new file mode 100644 index 0000000000..e7b695bd82 --- /dev/null +++ b/ext/spl/tests/bug64264.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #64264 (SPLFixedArray toArray problem) +--FILE-- +setSize(2); +$myFixedArr[1] = 'bar'; +$myFixedArr->setSize(5); +$array = $myFixedArr->toArray(); +$array[2] = "ERROR"; +$array[3] = "ERROR"; +$array[4] = "ERROR"; +unset($array[4]); +$myFixedArr->setSize(2); + +print_r($myFixedArr->toArray()); +?> +--EXPECTF-- +Array +( + [0] => foo + [1] => bar +) -- cgit v1.2.1