PHP notice

Undefined index: ajaxmode

/mnt/data/shnoulle/nginx/www/master/application/controllers/admin/themeoptions.php(117)

105      * @return TemplateConfiguration
106      */
107     public function turnAjaxmodeOffAsDefault(TemplateConfiguration $templateConfiguration)
108     {
109         $attributes = $templateConfiguration->getAttributes();
110         $hasOptions = isset($attributes['options']);
111         if ($hasOptions) {
112             $options = $attributes['options'];
113             $optionsJSON = json_decode($options, true);
114 
115             if ($options !== 'inherit' && $optionsJSON !== null) {
116                 $hasAjaxMode = isset($optionsJSON['ajaxmode']);
117                 $ajaxModeOn  = ($optionsJSON['ajaxmode'] == 'on');
118 
119                 if ($hasAjaxMode && $ajaxModeOn) {
120                     $optionsJSON['ajaxmode'] = 'off';
121                     $options = json_encode($optionsJSON);
122                     $templateConfiguration->setAttribute('options', $options);
123                 }
124             }
125         }
126         return $templateConfiguration;
127     }
128     /**
129      * Updates a particular model.

Stack Trace

#0
+
 /mnt/data/shnoulle/nginx/www/master/application/controllers/admin/themeoptions.php(84): themeoptions->turnAjaxmodeOffAsDefault(TemplateConfiguration)
79     public function update($id)
80     {
81         $model = $this->loadModel($id);
82         if (Permission::model()->hasTemplatePermission($model->template_name, 'update')) {
83             // Turn Ajax off as defualt save it after.
84             $model = $this->turnAjaxmodeOffAsDefault($model);
85             $model->save();
86 
87             if (isset($_POST['TemplateConfiguration'])) {
88                 $model->attributes = $_POST['TemplateConfiguration'];
89                 if ($model->save()) {
#3
+
 /mnt/data/shnoulle/nginx/www/master/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(themeoptions, ReflectionMethod, array("id" => "2796", "sa" => "update", "iId" => "2796"))
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
#7
+
 /mnt/data/shnoulle/nginx/www/master/application/controllers/AdminController.php(158): CController->run("themeoptions")
153                     $this->redirect(array('/admin/authentication/sa/login'));
154                 }
155             }
156         }
157 
158         return parent::run($action);
159     }
160 
161     /**
162      * Routes all the actions to their respective places
163      *
2019-11-14 18:15:21 nginx/1.16.1 Yii Framework/1.1.21