|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-02-08 15:51 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2020-02-08 16:09 UTC] cmb@php.net
[2020-02-08 16:09 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
Description: ------------ When an empty VT_ARRAY (i.e. a VT_ARRAY without any elements) is traversed via foreach, a com_exception ("index out of bounds") is thrown, what does not match the usual semantics of traversing empty collections. Test script: --------------- <?php $v = new variant([], VT_ARRAY); foreach ($v as $el) { var_dump($el); } echo "done\n"; ?> Expected result: ---------------- done Actual result: -------------- Fatal error: Uncaught com_exception: index out of bounds in C:\php-sdk\phpdev\vc15\x64\com.php:3 Stack trace: #0 {main} thrown in C:\php-sdk\phpdev\vc15\x64\com.php on line 3