CHttpException

Invalid request

/home/raovobjd/muahangmy.com/protected/controllers/front/NewsController.php(9)

01 <?php
02 
03 class NewsController extends Controller {
04 
05     public function actionDetail() {
06         $this->layout = 'blog_single_page';
07         if (!isset($_GET['news_id'])) throw new CHttpException(999, 'Invalid request');
08         $news = News::model()->findByPk($_GET['news_id']);
09         if (!$news) throw new CHttpException(999, 'Invalid request');
10         $news->view_count++;
11         $news->save();
12 
13         $related = News::model()->findAll(array(
14             'select' => 'news_id,title,image,image_small',
15             'condition' => 'news_id != :id',
16             'order' => 'rand()',
17             'params' => array('id' => $news->news_id),
18             'limit' => 3
19         ));
20 
21         Yii::app()->clientScript->registerMetaTag(Yii::app()->params['meta_keyword'], 'keywords');

Stack Trace

#7
+
 /home/raovobjd/muahangmy.com/protected/components/WebApplicationEndBehavior.php(24): CApplication->run()
19         // and raise it.
20         $this->onModuleCreate = array($this, 'changeModulePaths');
21         $this->onModuleCreate(new CEvent($this->owner));
22 
23         $this->configMailerComponent();
24         $this->owner->run(); // Run application.
25     }
26 
27     // This event should be raised when CWebApplication
28     // or CWebModule instances are being initialized.
29     public function onModuleCreate ($event) {
#9
+
 /home/raovobjd/muahangmy.com/index.php(13): CComponent->__call("runEnd", array("front"))
08 defined('YII_DEBUG') or define('YII_DEBUG', true);
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
10 
11 require_once($yii);
12 $app = Yii::createWebApplication($config);
13 $app->runEnd('front');
2024-03-28 12:35:49 LiteSpeed Yii Framework/1.1.14