PHP warning

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

/home/havailam/public_html/protected/views/site/print_tender.php(26)

14 
15 }
16 </script>
17         
18  <div class="row">
19          
20 <div class="col-xs-12 col-lg-12 col-md-12 col-sm-12" >
21             
22 
23        <div class="" >
24 
25             <div class="panel-body">
26        <?php if(count($model) > 0) { ?>
27 <!--شروع خبر-->        
28              <div class="row">
29              <br/><br/>
30                 <div class="col-xs-12 col-sm-12" >
31                     <h4><a href="#"><?php echo $model->title; ?></a></h4>
32                     <br/>
33                 </div>
34        <!--/col-*-4-->
35             <div class="col-xs-12 col-sm-12">
36             <br/>
37                 <?php echo $model->context; ?>
38             </div>

Stack Trace

#4
+
 /home/havailam/public_html/protected/controllers/SiteController.php(297): CController->render("print_tender", array("model" => Tender))
292 
293         if (isset($_GET['tenderId'])) {
294             $model = Tender::model()->findByPk($_GET['tenderId']);
295             if ($model != null) {
296                 $this->setPageTitle($model->title);
297                 $this->render('print_tender', array('model' => $model));
298             } else {
299                 $this->render('print_tender', array('model' => array()));
300             }
301         }
302     }
#12
+
 /home/havailam/public_html/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-29 08:41:56 LiteSpeed Yii Framework/1.1.15