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

/mnt/web410/e0/70/545781970/htdocs/framework/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

#10
+
 /mnt/web410/e0/70/545781970/htdocs/index.php(10): YiiBase::createWebApplication(array("params" => array("version" => "1.0", "baseUrl" => ""), "name" => "Pusan-Zaunbau", "defaultController" => "site", "theme" => "backend", ...))
05 <?php
06 session_start();
07 defined('YII_DEBUG') or define('YII_DEBUG', true);
08 require_once(dirname(__FILE__) . '/framework/yii.php');
09 $config = require(dirname(__FILE__) . '/protected/config/main.php');
10 $app = Yii::createWebApplication($config);
11 
12 
13 
14 
15 $app->run();
2025-06-02 15:44:47 Apache/2.4.63 (Unix) Yii Framework/1.1.14