PHP error

Return type of CMap::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

/home/targettr/target/framework/collections/CMap.php(82)

70      * @param boolean $value whether this list is read-only or not
71      */
72     protected function setReadOnly($value)
73     {
74         $this->_r=$value;
75     }
76 
77     /**
78      * Returns an iterator for traversing the items in the list.
79      * This method is required by the interface IteratorAggregate.
80      * @return CMapIterator an iterator for traversing the items in the list.
81      */
82     public function getIterator()
83     {
84         return new CMapIterator($this->_d);
85     }
86 
87     /**
88      * Returns the number of items in the map.
89      * This method is required by Countable interface.
90      * @return integer number of items in the map.
91      */
92     public function count()
93     {
94         return $this->getCount();

Stack Trace

#7
+
 /home/targettr/public_html/index.php(13): YiiBase::createWebApplication("/home/targettr/public_html/protected/config/main.php")
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-04-18 17:07:34 Apache Yii Framework/1.1.10