TypeError

count(): Argument #1 ($value) must be of type Countable|array, WebKontent given

/home/dpmptspbjb/public_html/versi1.1/protected/views/web/detail.php(1)

01 <?php $jumlah_kontent = count($model_kontent); ?>
02 <?php if ($jumlah_kontent>0): ?>
03     <?php 
04     $id = Yii::app()->request->getParam('id');
05     $model = Tblwebkontent::model()->findByPk($id);
06     //print_r($model); die();
07     $model->tblwebkontent_klik = $model_kontent['tblwebkontent_klik']+1;
08     $model->tblwebkontent_tampilhome = 'F';
09     $idkontent =  $model['tblwebkontent_id'];
10     //$komentar = WebKomentar::model()->findAll('tblwebkontent_id=:id',array(':id'=>$idkontent));
11     //$komentar = WebKomentar::model()->findByPk($idkontent);
12     $komentar = Yii::app()->db->createCommand("
13         SELECT *

Stack Trace

#4
+
 /home/dpmptspbjb/public_html/versi1.1/protected/controllers/WebController.php(118): CController->render("detail", array("model_kontent" => WebKontent))
113     public function actionDetail()
114     {
115         $id = Yii::app()->request->getParam('id');
116         $model_kontent = WebKontent::model()->findByPk($id);
117         //print_r($model_kontent);die();
118         $this->render('detail', array('model_kontent' =>$model_kontent));
119     }
120 
121     public function actionSlideFoto()
122     {
123         $data['list'] = Yii::app()->db->createCommand("
#12
+
 /home/dpmptspbjb/public_html/versi1.1/index.php(17): CApplication->run()
12 defined('YII_DEBUG') or define('YII_DEBUG',true);
13 // specify how many levels of call stack should be shown in each log message
14 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2024-03-29 11:47:12 Apache Yii Framework/1.1.15