PHP warning

count(): Parameter must be an array or an object that implements Countable

/home4/journfp8/public_html/yii-1.1.14.f0fee9/framework/db/ar/CActiveFinder.php(587)

575                     break;
576                 }
577             }
578 
579             if(!$fkDefined)
580             {
581                 $parentCondition=array();
582                 $childCondition=array();
583                 $count=0;
584                 $params=array();
585                 foreach($fks as $i=>$fk)
586                 {
587                     if($i<count($parent->_table->primaryKey))
588                     {
589                         $pk=is_array($parent->_table->primaryKey) ? $parent->_table->primaryKey[$i] : $parent->_table->primaryKey;
590                         $parentCondition[$pk]=$joinAlias.'.'.$schema->quoteColumnName($fk).'=:ypl'.$count;
591                         $params[':ypl'.$count]=$record->$pk;
592                         $count++;
593                     }
594                     else
595                     {
596                         $j=$i-count($parent->_table->primaryKey);
597                         $pk=is_array($this->_table->primaryKey) ? $this->_table->primaryKey[$j] : $this->_table->primaryKey;
598                         $childCondition[$pk]=$this->getColumnPrefix().$schema->quoteColumnName($pk).'='.$joinAlias.'.'.$schema->quoteColumnName($fk);
599                     }

Stack Trace

#4
+
 /home4/journfp8/public_html/admin/backend/protected/extensions/JI18nActiveRecord.php(39): CActiveRecord->__get("journeies")
34 
35     public function __get($name) {
36         if(array_key_exists($name,$this->_i18nAttributes))
37         return $this->_i18nAttributes[$name];
38         else
39         return parent::__get($name);
40     }
41 
42     public function __set($name,$value) {
43         if(array_key_exists($name,$this->_i18nAttributes))
44         $this->_i18nAttributes[$name]=$value;
#5
+
 /home4/journfp8/public_html/protected/controllers/ExploreController.php(443): JI18nActiveRecord->__get("journeies")
438         $criteria->order = 't.sort_order ASC, t.theme_image_id ASC';
439         $themeImages = ThemeImage::model()->localized()->findAll($criteria);
440 
441 
442         // Journey
443         $journeyIdList = CHtml::listData($theme->journeies, 'journey_id', 'journey_id');
444 
445         $criteria = new CDbCriteria();
446         $criteria->addInCondition('t.journey_id', $journeyIdList); 
447         $criteria->order = 't.sort_order DESC';
448 
#13
+
 /home4/journfp8/public_html/index.php(16): CApplication->run()
11     ini_set('display_errors', 'On');
12     error_reporting(E_ALL | E_STRICT);
13 }
14 
15 require_once($yii);
16 Yii::createWebApplication($config)->run();
17 
18 ?>
2024-03-29 06:21:41 Apache Yii Framework/1.1.14