PHP warning

Invalid argument supplied for foreach()

/usr/www/users/ffaode/old/yii/framework/web/CUrlManager.php(286)

274     /**
275      * Constructs a URL.
276      * @param string $route the controller and the action (e.g. article/read)
277      * @param array $params list of GET parameters (name=>value). Both the name and value will be URL-encoded.
278      * If the name is '#', the corresponding value will be treated as an anchor
279      * and will be appended at the end of the URL.
280      * @param string $ampersand the token separating name-value pairs in the URL. Defaults to '&'.
281      * @return string the constructed URL
282      */
283     public function createUrl($route,$params=array(),$ampersand='&')
284     {
285         unset($params[$this->routeVar]);
286         foreach($params as $i=>$param)
287             if($param===null)
288                 $params[$i]='';
289 
290         if(isset($params['#']))
291         {
292             $anchor='#'.$params['#'];
293             unset($params['#']);
294         }
295         else
296             $anchor='';
297         $route=trim($route,'/');
298         foreach($this->_rules as $i=>$rule)

Stack Trace

#0
+
 /usr/www/users/ffaode/old/protected/components/DLanguageUrlManager.php(6): CUrlManager->createUrl("site/site", null, "&")
01 <?php 
02  class DLanguageUrlManager extends CUrlManager
03 {
04     public function createUrl($route, $params=array(), $ampersand='&')
05     {
06         $url = parent::createUrl($route, $params, $ampersand);
07         return DMultilangHelper::addLangToUrl($url);
08     }
09 }
10 ?>
#3
+
 /usr/www/users/ffaode/old/protected/controllers/SiteController.php(513): CController->createUrl("site", null)
508     public function actionRedirect() {
509         $struct_id = Yii::app()->request->getParam('id');
510         //get structure
511         $structure = Structure::model()->findByPk($struct_id);
512         $params = json_decode($structure->text, true);
513         $this->redirect(Yii::app()->controller->createUrl('site', $params));
514     }
515 
516     public function actionExperts() {
517         if ($_GET["test"]) {
518             $this->layout = '/layouts/redesign';
#11
+
 /usr/www/users/ffaode/old/index.php(14): CApplication->run()
09 defined('YII_DEBUG') or define('YII_DEBUG',true);
10 // specify how many levels of call stack should be shown in each log message
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
2024-03-19 06:46:49 Apache Yii Framework/1.1.14