PHP warning

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

/home/sheringaid/public_html/protected/controllers/SiteController.php(130)

118     {     
119 
120          $this->layout = '//layouts/inner-page';
121 
122          $model=new ContactForm;
123 
124                if($_GET['page']!='contact-us')
125 
126                { 
127                  $link=$_GET['page'];
128                 $title=Pages::model()->findByAttributes(array('pageLink'=>$link));
129             
130                if(count( $title)>0){
131                    $this->layout = '//layouts/inner-page';
132                 $this->render('page', $_GET['page']);
133                }
134                else
135                {  
136                  $this->layout = '//layouts/page-notfound';  
137                  $this->render('404');  
138                }
139             // $this->render('page', $_GET['page']);
140 
141                }
142 

Stack Trace

#7
+
 /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-29 20:37:25 Apache Yii Framework/1.1.14