FIX PHP 8.1 compatability for iterators.

Setting a proper return type for these will be done in a separate PR
This commit is contained in:
Guy Sartorelli 2022-09-09 10:48:05 +12:00
parent d9be52579d
commit 62ee63706f
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
3 changed files with 3 additions and 2 deletions

View File

@ -45,6 +45,7 @@ class MySQLQuery extends Query
}
}
#[\ReturnTypeWillChange]
public function getIterator()
{
$floatTypes = [MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE, MYSQLI_TYPE_DECIMAL, MYSQLI_TYPE_NEWDECIMAL];

View File

@ -102,6 +102,7 @@ class MySQLStatement extends Query
call_user_func_array([$this->statement, 'bind_result'], $variables ?? []);
}
#[\ReturnTypeWillChange]
public function getIterator()
{
while ($this->statement->fetch()) {

View File

@ -155,9 +155,8 @@ abstract class Query implements \IteratorAggregate
/**
* Return the next record in the query result.
*
* @return array
*/
#[\ReturnTypeWillChange]
abstract public function getIterator();
/**