|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-03-07 21:02 UTC] fernando at null-life dot com
[2017-03-10 07:18 UTC] laruence@php.net
[2017-03-10 07:18 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 16 09:00:01 2026 UTC |
Description: ------------ The error message claims that an empty array will be used because an invalid argument was supplied, however the script will actually die because of a Fatal Error. Test script: --------------- <?php $x = new ArrayIterator('.'); echo "here"; Expected result: ---------------- php.exe x.php Fatal error: Uncaught InvalidArgumentException: Passed variable is not an array or object in x\x.php:3 Stack trace: #0 x\x.php(3): ArrayIterator->__construct('.') #1 {main} thrown in x\x.php on line 3 Actual result: -------------- php.exe x.php Fatal error: Uncaught InvalidArgumentException: Passed variable is not an array or object, using empty array instead in x\x.php:3 Stack trace: #0 x\x.php(3): ArrayIterator->__construct('.') #1 {main} thrown in x\x.php on line 3