mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
d9be52579d
commit
62ee63706f
@ -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];
|
||||
|
@ -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()) {
|
||||
|
@ -155,9 +155,8 @@ abstract class Query implements \IteratorAggregate
|
||||
|
||||
/**
|
||||
* Return the next record in the query result.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
abstract public function getIterator();
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user