PHP warning

Invalid argument supplied for foreach()

/home/gktizein.gr/public_html/protected/views/siteCategoryContent/viewContentPropertySingle.php(93)

081             $('#project_map').hide();
082             $('#project_price').hide();
083             $('#project_video').hide();
084             $('#project_broch').hide();
085         }
086 
087 
088         $(window).load(function () {
089 
090 
091             <?php
092             $myarray = array();
093             foreach ($project->contentPropertyResources as $resource) {
094                 array_push($myarray, $resource->id);
095             }
096             echo 'var resourcesArray = new Array(' . implode(',', $myarray) . ');';
097             ?>
098 
099             //
100 
101             var curImage = 0;
102             var curImageID = resourcesArray[0];
103             $('ul.images .img' + curImageID).animate({opacity: 1});
104             window.myInterval = setInterval(function () {
105                 var curname = 'img' + resourcesArray[curImage];

Stack Trace

#4
+
 /home/gktizein.gr/public_html/protected/controllers/SiteCategoryContentController.php(437): CController->render("viewContentPropertySingle", array("model" => SiteCategoryContent, "lang" => "", "id" => "12"))
432         $model = SiteCategoryContent::model()->find('siteCategoryID=:siteCategoryID', array(':siteCategoryID' => $pageid));
433         if (isset($pageid)) {
434             $this->menu = $this->createMenu($pageid, $lang);
435             $this->bgimage = 'bgimage' .$pageid.'.jpg';
436             $this->breadcrumb = $this->createBreadCrumb($pageid, $lang);
437             $this->render('viewContentPropertySingle', array('model' => $model, 'lang' => $lang, 'id' => $id));
438         }else
439             throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
440     }
441 
442     /**
#19
+
 /home/gktizein.gr/public_html/index.php(13): CApplication->run()
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-03-28 09:43:47 Apache Yii Framework/1.1.10