PHP notice

Undefined index: HTTP_REFERER

/var/www/ektaservice/data/www/ektaservice.ua/application/models/Review.php(47)

35             //array('rating', 'required', 'on'=>'insert', 'message'=>Yii::t('personal', 'Необходимо оценить качество услуг')),
36             array('name, email', 'length', 'max'=>128),
37             array('phone', 'length', 'min'=>10, 'max'=>10),
38             array('date_creation', 'default', 'on'=>'insert', 'value'=>new CDbExpression('NOW()')),
39             array('date_modification', 'default', 'on'=>'update', 'value'=>new CDbExpression('NOW()'), 'setOnEmpty'=>false),
40             array('text, comment', 'filter', 'filter'=>'strip_tags'),
41             array('front, rating', 'numerical', 'integerOnly'=>true),
42             array('auth, client_id', 'unsafe'),
43             // The following rule is used by search().
44             array('id, name, email, rating, text, comment, date_creation, date_modification', 'safe', 'on'=>'search'),
45 
46         );
47         if (strpos($_SERVER['HTTP_REFERER'],'/admin/') === false) {
48             $rules[] = array('verifyCode', 'required');
49             $rules[] = array('verifyCode', 'ext.yiiReCaptcha.ReCaptchaValidator');
50         }
51         // NOTE: you should only define rules for those attributes that
52         // will receive user inputs.
53         return $rules;
54     }
55 
56     /**
57      * @return array relational rules.
58      */
59     public function relations() {

Stack Trace

#5
+
 /var/www/ektaservice/data/www/ektaservice.ua/application/views/site/reviews.php(28): CActiveForm->textField(Review, "name", array("class" => "form-control"))
23                 <div class="form-group">
24                     <label for="name" class="col-sm-2 control-label">
25                         <?= Yii::t('public', 'Имя'); ?>
26                     </label>
27                     <div class="col-sm-10">
28                         <?php echo $form->textField($model, 'name', array('class'=>'form-control')); ?>
29                         <?php echo $form->error($model, 'name'); ?>
30                     </div>
31                 </div>
32                 <div class="form-group">
33                     <label for="email" class="col-sm-2 control-label">
#10
+
 /var/www/ektaservice/data/www/ektaservice.ua/application/controllers/SiteController.php(136): CController->render("reviews", array("model" => Review, "page" => Page, "reviews" => array(Review, Review, Review, Review, ...)))
131             }
132         }
133 
134         $reviews = Review::model()->findAll(array('condition'=>'front IS NOT NULL AND id>1392', 'order'=>'date_creation DESC'));
135 
136         $this->render('reviews', array('model'=>$model, 'page' => $page, 'reviews'=>$reviews));
137     }
138 
139     public function actionSpecial($alias=null) {
140         if ($alias) {
141             $special = array(
#18
+
 /var/www/ektaservice/data/www/ektaservice.ua/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 12:58:36 Apache/2.2.22 (Debian) Yii Framework/1.1.17