PHP warning

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

/home/sheringaid/public_html/themes/sheahearingaidcenter/views/layouts/blog-single.php(4)

01 <?php require_once('inner-header.php')?>
02 <?php $link=$_GET['page'];  
03 $title=Pages::model()->findByAttributes(array('pageLink'=>$link));
04       if(count( $title)>0){?>
05        <?php if (! empty($title->pageImage)) { ?>
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 
12   <div class="inner-content-block">
13    <div class="innertitle blogTitle">
14             <div class="container">
15              <div class="title-block"> <h1><?php echo Post::model()->findByAttributes(array('id'=>$_GET['id']))->title; ?></h1></div>
16             </div>

Stack Trace

#3
+
 /home/sheringaid/public_html/protected/controllers/PostController.php(64): CController->render("view", array("model" => Post, "comment" => Comment, "recentposts" => array(Post, Post, Post), "categories" => array(Posttocategory), ...))
59             'model'=>$post,
60             'comment'=>$comment,
61             'recentposts'=>$recentPosts,
62             
63             'categories'=>$category,
64             'catlist'=>$post->getcategoriesList()
65             
66         ));
67     }
68 
69     /**
#18
+
 /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 22:51:55 Apache Yii Framework/1.1.14