CHttpException

Page is not found

/srv/www/apppicker.com/htdocs/protected/controllers/NewsController.php(9)

01 <?php
02 
03 class NewsController extends Controller
04 {
05     public function actionDetails($id, $slug = '', $version=null)
06     {
07         $post = News::loadArticleById($id);
08         if(empty($post)) {
09             throw new CHttpException(404, "Page is not found");
10         }
11         $post->guest_writer = $post->cv->guest_writer;
12         $post->bio = $post->cv->bio;
13 
14         if (!$post || ($version && !$post->switchToVersion($version))) {
15             throw new CHttpException(404, "Page is not found");
16         }
17         if ($post->slug != $slug) {
18             ViewHelper::redirect($id, RatingTypes::TYPE_ARTICLE_NEWS);
19         }
20 
21         $similarApps = false;

Stack Trace

#9
+
 /srv/www/apppicker.com/htdocs/index.php(58): CApplication->run()
53 
54 if (!isset($app->params[Configuration::PREFIX_ELASTICA]) || $app->params[Configuration::PREFIX_ELASTICA] == null || $app->params[Configuration::PREFIX_ELASTICA] == '') {
55     $app->params->add(Configuration::PREFIX_ELASTICA, '1');
56 }
57 
58 $app->run();
2024-03-28 10:16:13 nginx/1.20.1 Yii Framework/1.1.16