TypeError

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

/var/www/vhosts/kreatopolis.rs/httpdocs/protected/views/site/galerija_prikaz.php(17)

05     </h1>
06     <section class="gallery_view">
07         <div class="tabbable-panel">
08             <div class="tabbable-line">
09                 <ul class="nav nav-tabs text-center">
10 
11                     <?php if (count(json_decode($model->gallery_images)) > 0 && count(json_decode($model->gallery_videos)) > 0) { ?>
12                         <li class="active">
13                             <a href="#tab_default_1" data-toggle="tab">
14                                 Slike</a>
15                         </li>
16                     <?php } ?>
17                     <?php if (count(json_decode($model->gallery_videos)) > 0) { ?>
18                         <li>
19                             <a href="#tab_default_2" data-toggle="tab">
20                                 Video </a>
21                         </li>
22                     <?php } ?>
23 
24                 </ul>
25 
26                 <div class="tab-content">
27                     <div class="tab-pane active reference-holder js-height-set" data-height-size="fit-modal" 
28                          data-url="<?= Yii::app()->createUrl("ajax/LoadReference"); ?>" data-slug="<?=$model->slug ; ?>" id="tab_default_1" active>
29                         <?php

Stack Trace

#4
+
 /var/www/vhosts/kreatopolis.rs/httpdocs/protected/controllers/SiteController.php(215): CController->render()
210         $model = clsLoad::findTblGalleryBySlug($id);
211 
212         header('X-Frame-Options: GOFORIT');
213 
214 
215         $this->render('galerija_prikaz', array('model' => $model));
216     }
217 
218     /*     * vest kategorije */
219 
220     public function actionVestiKategorije($id = null) {
#14
+
 /var/www/vhosts/kreatopolis.rs/httpdocs/index.php(14): CApplication->run()
09 // change the following paths if necessary
10 $yii=dirname(__FILE__).'/yii/framework/yii.php';
11 $config=dirname(__FILE__).'/protected/config/main.php';
12 
13 require_once($yii);
14 Yii::createWebApplication($config)->run();
15 
16 
2024-03-28 20:42:13 Apache Yii Framework/1.1.14