PHP notice

Undefined index: detail

/srv/http/virtual/protected/controllers/NewsController.php(42)

30             $criteria = new CDbCriteria;
31             $criteria->order = 'sort desc,postedon desc';
32             $list = News::model()->findAll($criteria);
33             $criteria = new CDbCriteria;
34             if (isset($_GET['keywords'])) {
35                 $keywords = CCommon::formPost($_GET['keywords']);
36                 $criteria->addCondition("title like '%{$keywords}%'");
37             }
38             $criteria->order = 'sort desc,postedon desc';
39             $list_data = News::model()->findAll($criteria);
40         }else{
41             if (isset($_GET['new_type'])) {
42                 $type = $GLOBALS['__NEWS_TYPE_URL'][$_GET['new_type']];
43                 $criteria->addCondition("pid = {$type}");
44             }
45             //新闻search
46             if (isset($_GET['keywords'])) {
47                 $keywords = CCommon::formPost($_GET['keywords']);
48                 $criteria->addCondition("title like '%{$keywords}%'");
49             } else { //temSEO 新闻搜索页不需要
50                 $pages = new CPagination(News::model()->count($criteria));
51                 if (!empty($_GET['page']) && $_GET['page'] > $pages->getPageCount())
52                     throw new CHttpException(404);
53                 $news_page = !empty($_GET['page']) && $_GET['page'] ? $_GET['page'] : '';
54     

Stack Trace

#7
+
 /srv/http/virtual/www.brandopneumatic.com/htdocs/index.php(82): CApplication->run()
77 
78 // remove the following line when in production mode
79 defined('YII_DEBUG') or define('YII_DEBUG',true);
80 
81 require_once($yii);
82 Yii::createWebApplication($config)->run();
2024-04-18 15:35:21 nginx/1.24.0 Yii Framework/1.1.12