mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Add “#[\ReturnTypeWillChange]” comments to all InteratorAggregate, Countable and PDOStatement interface classes to stop PHP 8.1 notices per https://php.watch/versions/8.1/internal-method-return-types and processwire/processwire-issues#1467 ... someday when all PHP 5.x support can be dropped these will be converted to PHP 7.1+ return types
This commit is contained in:
@@ -81,6 +81,7 @@ class FilenameArray implements \IteratorAggregate, \Countable {
|
||||
* @return \ArrayObject
|
||||
*
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getIterator() {
|
||||
return new \ArrayObject($this->data);
|
||||
}
|
||||
@@ -138,6 +139,7 @@ class FilenameArray implements \IteratorAggregate, \Countable {
|
||||
* @return int
|
||||
*
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count() {
|
||||
return count($this->data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user