PHP notice

Undefined index: invalid

/mnt/data/shnoulle/nginx/www/master/plugins/brokenPlugin/brokenPlugin.php(119)

107     }
108 
109     /**
110      * The main function
111      * @param int $surveyId Survey id
112      * @return string
113      */
114     public function actionCheck($surveyId)
115     {
116         $moreData = array(
117             // Just to show the issue
118         );
119         if($moreData['invalid']) {
120             return "Invalid data";
121         }
122         return "Valid data";
123     }
124 
125     /**
126      * The main function
127      * @param int $surveyId Survey id
128      * @return string
129      */
130     public function actionView($surveyId)
131     {

Stack Trace

#1
+
 /mnt/data/shnoulle/nginx/www/master/application/controllers/admin/PluginHelper.php(125): ReflectionMethod->invoke(brokenPlugin, "583968")
120      * @return string
121      */
122     protected function getContent($surveyId, $plugin, $method)
123     {
124         list($pluginInstance, $refMethod) = $this->getPluginInstanceAndMethod($plugin, $method);
125         return $refMethod->invoke($pluginInstance, $surveyId);
126     }
127 }
#2
+
 /mnt/data/shnoulle/nginx/www/master/application/controllers/admin/PluginHelper.php(40): PluginHelper->getContent("583968", "brokenPlugin", "actionCheck")
35                 $aData['activated'] = $oSurvey->active;
36             }
37             // Plugin must test to send 404 if needed, maybe want to “create” a new survey, who know …
38         }
39         $aData['surveyid'] = $surveyid;
40         $content = $this->getContent($surveyid, $plugin, $method);
41 
42         $aData['sidemenu'] = array();
43         $aData['sidemenu']['state'] = false;
44         $aData['sideMenuBehaviour'] = getGlobalSetting('sideMenuBehaviour');
45         $aData['content'] = $content;
#5
+
 /mnt/data/shnoulle/nginx/www/master/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(PluginHelper, ReflectionMethod, array("surveyid" => "583968", "plugin" => "brokenPlugin", "method" => "actionCheck", "sa" => "sidebody", ...))
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
2019-11-09 11:12:59 nginx/1.16.1 Yii Framework/1.1.21