PHP warning

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

/home3/ratushny/public_html/framework/db/ar/CActiveFinder.php(1355)

1343 
1344     private function queryOneMany()
1345     {
1346         $relation=$this->relation;
1347         $model=CActiveRecord::model($relation->className);
1348         $builder=$model->getCommandBuilder();
1349         $schema=$builder->getSchema();
1350         $table=$model->getTableSchema();
1351         $parent=$this->_parent;
1352         $pkTable=$parent->model->getTableSchema();
1353 
1354         $fks=preg_split('/\s*,\s*/',$relation->foreignKey,-1,PREG_SPLIT_NO_EMPTY);
1355         if(count($fks)!==count($pkTable->primaryKey))
1356             throw new CDbException(Yii::t('yii','The relation "{relation}" in active record class "{class}" is specified with an invalid foreign key. The columns in the key must match the primary keys of the table "{table}".',
1357                         array('{class}'=>get_class($parent->model), '{relation}'=>$relation->name, '{table}'=>$pkTable->name)));
1358 
1359         // set up mapping between fk and pk columns
1360         $map=array();  // pk=>fk
1361         foreach($fks as $i=>$fk)
1362         {
1363             if(!isset($table->columns[$fk]))
1364                 throw new CDbException(Yii::t('yii','The relation "{relation}" in active record class "{class}" is specified with an invalid foreign key "{key}". There is no such column in the table "{table}".',
1365                     array('{class}'=>get_class($parent->model), '{relation}'=>$relation->name, '{key}'=>$fk, '{table}'=>$table->name)));
1366 
1367             if(isset($table->foreignKeys[$fk]))

Stack Trace

#5
+
 /home3/ratushny/public_html/protected/extensions/widgets/WTagCloud.php(56): CActiveRecord->findAll()
51     }
52     
53     protected function getTags()
54     {
55         $data = array();
56         $tags = Tag::model()->with('tagCount')->findAll();
57         foreach($tags as $tag)
58         {
59             $this->tags[$tag->tag_id] = $tag->title;
60             $data[$tag->tag_id] = $tag->tagCount;
61         }
#6
+
 /home3/ratushny/public_html/protected/extensions/widgets/WTagCloud.php(67): WTagCloud->getTags()
62         return $data;
63     }
64     
65     public function run()
66     {
67         $data = $this->getTags();
68         $data = $this->dropLowWeight($data);
69         $data = $this->calculateWeight($data);
70         
71         $this->render('WTagCloud',array(
72             'data'=>$data,
#8
+
 /home3/ratushny/public_html/protected/views/reference/index.php(34): CBaseController->widget("ext.widgets.WTagCloud", array())
29         </div>
30         <div class="block">
31             <h2 class="title">Article Tags</h2>
32             <?php
33                 $this->widget('ext.widgets.WTagCloud', array(
34                 ));
35             ?>
36         </div>
37         <div class="block">
38             <?php echo Yii::app()->params['google_adsense_sidebar']; ?>
39         </div>
2024-03-19 04:27:06 Apache Yii Framework/1.1.13