Bug #80454 [NEW]: Type mismatch error
| From: | brucekwells at gmail dot com | Date: | Tue, 01 Dec 2020 14:05:25 +0000 |
| Subject: | Bug #80454 [NEW]: Type mismatch error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-230767@lists.php.net to get a copy of this message | ||
From: brucekwells at gmail dot com
Operating system: Window 10 latest
PHP version: 8.0.0
Package: *Programming Data Structures
Bug Type: Bug
Bug description:Type mismatch error
Description:
------------
The test script produces the following error on PHP 8.0.0:
Fatal error: Uncaught TypeError: NoRewindIterator::__construct():
Argument #1 ($iterator) must be of type Iterator, SplFixedArray given
Works on PHP 7.4.9
Test script:
---------------
<?php
$tokens = [1,2,3];
new NoRewindIterator(SplFixedArray::fromArray($tokens));
Expected result:
----------------
No error message generated
Actual result:
--------------
Fatal error: Uncaught TypeError: NoRewindIterator::__construct():
Argument #1 ($iterator) must be of type Iterator, SplFixedArray given in
filename.php
--
Edit bug report at https://bugs.php.net/bug.php?id=80454&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80454&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80454&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80454&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80454&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80454&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80454&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80454&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80454&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80454&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80454&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80454&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80454&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80454&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80454&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80454&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80454&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80454&r=mysqlcfg