PHP notice

Undefined variable: chek

/mnt/data/shnoulle/nginx/www/3LTS/plugins/brokenBeforeSurvey/brokenBeforeSurvey.php(28)

16     static protected $description = 'More hard to debug plugin in develop : error page.';
17     static protected $name = 'brokenBeforeSurvey';
18 
19 
20     public function init()
21     {
22         /* Menu maganement */
23         $this->subscribe('beforeSurveyPage');
24     }
25 
26     public function beforeSurveyPage()
27     {
28         if ($chek) {
29             // Throw a 500 error in debug mode
30         }
31     }
32 }

Stack Trace

#1
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/libraries/PluginManager/PluginManager.php(185): call_user_func(array(brokenBeforeSurvey, "beforeSurveyPage"))
180         if (isset($this->subscriptions[$eventName])) {
181             foreach ($this->subscriptions[$eventName] as $subscription) {
182                 if (!$event->isStopped()
183                  && (empty($target) || in_array(get_class($subscription[0]), $target))) {
184                     $subscription[0]->setEvent($event);
185                     call_user_func($subscription);
186                 }
187             }
188         }
189 
190         return $event;
#2
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/controllers/survey/index.php(158): LimeSurvey\PluginManager\PluginManager->dispatchEvent(PluginEvent)
153         }
154 
155         /* Launch beforeSurveyPage before all renderExitMessage */
156         $beforeSurveyPageEvent = new PluginEvent('beforeSurveyPage');
157         $beforeSurveyPageEvent->set('surveyId', $surveyid);
158         App()->getPluginManager()->dispatchEvent($beforeSurveyPageEvent);
159 
160         if ($this->_isClientTokenDifferentFromSessionToken($clienttoken, $surveyid)) {
161             $sReloadUrl = $this->getController()->createUrl("/survey/index/sid/{$surveyid}", array('token'=>$clienttoken, 'lang'=>App()->language, 'newtest'=>'Y'));
162             $aErrors    = array(gT('Token mismatch'));
163             $asMessage  = array(gT('The token you provided doesn\'t match the one in your session.'));
#3
+
 /mnt/data/shnoulle/nginx/www/3LTS/application/controllers/survey/index.php(24): index->action()
19     public $oTemplate;
20 
21     public function run()
22     {
23         useFirebug();
24         $this->action();
25     }
26 
27     public function action()
28     {
29         global $surveyid;
2020-01-23 07:25:02 nginx/1.16.1 Yii Framework/1.1.22-dev