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/ntsolvec/public_html/yiifw/collections/CMap.php(81)

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

Stack Trace

#8
+
 /home/ntsolvec/public_html/index.php(13): YiiBase::createWebApplication("/home/ntsolvec/public_html/protected/config/main.php")
08 // specify how many levels of call stack should be shown in each log message
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
10 // for getting current local time
11 date_default_timezone_set("Asia/Karachi");
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 15:46:52 LiteSpeed Yii Framework/1.1.14