PHP warning

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

/home3/yotraigo/public_html/app/protected/views/clients/signup.php(202)

190             <div class="col-sm-9">
191                 <?php echo $form->textField($model, 'pound_neg', array('class' => 'form-control decimal', 'data-validate' => 'required', 'autocomplete' => 'off', 'autocorrect' => 'off', 'autocapitalize' => 'off', 'spellcheck' => 'false')); ?>
192                 <?php echo $form->error($model, 'pound_neg', array('class' => 'validate-error')); ?>
193             </div>
194         </div>
195 
196         <div class="form-group">
197             <?php echo $form->labelEx($model, 'user_interests', array('class' => 'col-sm-3 control-label')); ?>
198             <div class="col-sm-9">
199                 <?php
200                 $selected = array();
201                 $array_interests = CJSON::decode($model->user_interests);
202                 if (count($array_interests) > 0) {
203                     foreach ($array_interests as $value) {
204                         $selected[$value] = array('selected' => 'selected');
205                     }
206                 }
207                 ?>
208                 <?php echo $form->dropDownList($model, 'user_interests', Interests::model()->getInterestsList(), array('multiple' => 'multiple', 'class' => 'form-control multi-select', 'options' => $selected)); ?>
209             </div>
210         </div>
211 
212     </div>
213 
214 </div>

Stack Trace

#4
+
 /home3/yotraigo/public_html/app/protected/controllers/ClientsController.php(336): CController->render("signup", array("model" => Clients))
331                 $this->redirect(array('dashboard'));
332             }
333         }
334         
335         $this->render('signup', array(
336             'model' => $model,
337         ));
338     }
339     
340     public function actionDashboard() {
341         
#19
+
 /home3/yotraigo/public_html/app/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-19 05:56:17 Apache Yii Framework/1.1.15