PHP notice

Undefined index: HTTP_REFERER

/var/www/tpona/data/www/tvercars.ru/www/protected/controllers/SeoController.php(51)

39                     
40                     $jump = new Jump();
41                     $jump->urlId = $url->id;
42                     $jump->jumpTime = time();
43                     $jump->save();
44                     
45                     $this->redirect($url->url);
46                 }
47                 
48             }
49         }
50         
51         if (!preg_match("/tvercars/", $_SERVER['HTTP_REFERER'])) {
52             throw new CHttpException(404, 'Мы не можем понять куда вы хотите перейти (( ');
53         }
54         // Редирект осуществляется по URL в модели JumpUrl
55         if (isset($_GET['url'])) {
56             $model = new SeoUrlRedirect;
57             $model->url = $_GET['url'];
58 
59             if ($model->validate()) {
60                 $url = JumpUrl::model()->find(array(
61                     'condition' => 'url=:url',
62                     'params' => array(':url' => $model->url)
63                 ));

Stack Trace

#12
+
 /var/www/tpona/data/www/tvercars.ru/www/index.php(17): CApplication->run()
12     //defined('YII_DEBUG') or define('YII_DEBUG', false);
13     // specify how many levels of call stack should be shown in each log message
14     defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
15 
16     require_once($yii);
17     Yii::createWebApplication($config)->run();
2024-03-28 17:52:04 Apache/2.4.29 (Ubuntu) Yii Framework/1.1.14