CHttpException

Invalid request

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

01 <?php
02 
03 class ProductController extends Controller {
04     public $layout = 'product_page';
05 
06     public function actionDetail() {
07         if (!isset($_GET['product_id'])) throw new CHttpException(999, 'Invalid request');
08         $product = Product::model()->findByPk($_GET['product_id']);
09         if ($product == null) throw new CHttpException(999, 'Invalid request');
10         $product->views++;
11         $product->save();
12 
13         //region for SEO
14         $seo_keyword = $product->product_name . ' , ' . Yii::app()->params['meta_keyword'];
15         $seo_description = $product->product_name . ' , ' . Yii::app()->params['meta_description'];;
16         Yii::app()->clientScript->registerMetaTag($seo_keyword, 'keywords');
17         Yii::app()->clientScript->registerMetaTag($seo_description, 'description');
18         //canonical & title link
19         $this->pageTitle = $product->product_name . ' , ' . Yii::app()->params['meta_title'];
20         Yii::app()->clientScript->registerLinkTag('canonical', null, HSCommon::getCurrentUrl());
21         //endregion

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-19 07:12:41 LiteSpeed Yii Framework/1.1.14