PHP warning

implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed

/var/www/u0040278/data/www/donkihot.ru/protected/controllers/AboutAjaxController.php(120)

108         }
109         
110         public function actionNovostiYear($id) {
111                 $deviation = 4;
112                 $_id = substr($id, 0, 4);
113                 $dataProvider_year=new CActiveDataProvider('AboutHotelNovosti', array('pagination' => false));
114                 foreach($dataProvider_year->getData() as $record) {
115                 $timestamp=CDateTimeParser::parse($record->Created,'yyyy-MM-dd hh:mm:ss');
116                     if ($_id == date('Y',$timestamp)){
117                         $idOfYear[] = $record->id;
118                     }
119                 }
120                 $comma_separated = implode(" , ", $idOfYear);
121                 
122                 if (substr($id, 4, 2)==0){
123                     $id = max($idOfYear);
124                 } else {
125                     $id = substr($id, 4, 2);
126                 }
127                 
128                 //$_id = $id;//substr($id, 4, 2);
129                 //$id = max($idOfYear);
130                 
131                 if (count($idOfYear) != 1){
132                     $criteria = new CDbCriteria();

Stack Trace

#0
+
 /var/www/u0040278/data/www/donkihot.ru/protected/controllers/AboutAjaxController.php(120): implode(" , ", null)
115                 $timestamp=CDateTimeParser::parse($record->Created,'yyyy-MM-dd hh:mm:ss');
116                     if ($_id == date('Y',$timestamp)){
117                         $idOfYear[] = $record->id;
118                     }
119                 }
120                 $comma_separated = implode(" , ", $idOfYear);
121                 
122                 if (substr($id, 4, 2)==0){
123                     $id = max($idOfYear);
124                 } else {
125                     $id = substr($id, 4, 2);
#7
+
 /var/www/u0040278/data/www/donkihot.ru/protected/modules/rights/components/RController.php(50): CFilter->filter(CFilterChain)
45     }
46     
47     public function filterRights($filterChain) {
48         $filter = new RightsFilter;
49         $filter->allowedActions = $this->allowedActions();
50         $filter->filter($filterChain);
51     }
52 
53     /**
54      * @return string the actions that are always allowed separated by commas.
55      */
#15
+
 /var/www/u0040278/data/www/donkihot.ru/www/index.php(17): CApplication->run()
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::setPathOfAlias('root', $root);
16 Yii::setPathOfAlias('bootstrap', $root . DS . 'protected' . DS . 'extensions' . DS . 'bootstrap');
17 Yii::createWebApplication($config)->run();
2024-03-29 13:20:02 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 Phusion_Passenger/5.3.7 Yii Framework/1.1.14