Books

PHP warning

PHP warning

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

/home/bookata/public_html/protected/controllers/BookController.php(683)

671                 'criteria'=>array(
672                     'condition'=>' isValid=1 ',
673                     ),
674                 'pagination'=>array(
675                     'pageSize'=>20,
676                 ),
677             )
678         );
679         $this->render('index',array(
680             'dataProvider'=>$dataProvider,
681         ));
682 
683             echo ( count($dataProvider));
684 
685     }
686 
687 
688     public function actionManage()
689     {
690         $dataProvider=new CActiveDataProvider('Book');
691         $this->render('manage',array(
692             'dataProvider'=>$dataProvider,
693         ));
694     }
695 

Stack Trace

#12
+
 /home/bookata/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();
2021-07-28 20:02:54 Apache Yii Framework/1.1.13