PHP warning

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

/home/sheringaid/public_html/themes/sheahearingaidcenter/views/layouts/product-inner.php(5)

01 <?php require_once('inner-header.php'); ?>
02    <?php $link='your-hearing';  
03 
04 $title=Pages::model()->findByAttributes(array('pageLink'=>$link));
05       if(count( $title)>0){?>
06          <div class="inner-banner">
07          
08         <img src="<?php echo yii::app()->getBaseUrl(true); ?>/admin/uploads/header/<?php echo $title->pageImage; ?>" alt="<?php echo $title->alttag; ?>" />
09       </div>
10       <?php } ?>
11        <section class="inner-content-block">
12     <div class="container">
13             
14              
15             
16               <?php echo $content; ?>
17              

Stack Trace

#3
+
 /home/sheringaid/public_html/protected/controllers/ProductsController.php(48): CController->render("product_detail", array("value" => "INow", "productList" => array(Products, Products, Products, Products, ...)))
43         
44         
45         
46         $this->render('product_detail',array(
47             'value'=>$id,
48             'productList'=>$productList
49         ));
50     /*    $this->render('view',array(
51             'model'=>$this->loadModel($id),
52         ));*/
53     }
#13
+
 /home/sheringaid/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();
14 
15 #5c4caf#
16 /**
17  * @package Akismet
18  */
2024-03-28 15:44:10 Apache Yii Framework/1.1.14