I got an error about language params 'langcode param is undefined' when I logged in, corrected by editing my profile and clicking save.
Here's the langcode error pasted inline:
User warning
langcode param is undefined
C:\limesurvey_train\application\libraries\Limesurvey_lang.php(32)
20 $locale = new limesurvey_lang('en'); // Char code
21 print $locale->getTranslation("Hello World!");
22 */
23
24
25 class Limesurvey_lang {
26
27 var $gettextclass;
28 var $langcode;
29
30 function limesurvey_lang($sLanguageCode){
31 if(empty($sLanguageCode))
32 trigger_error('langcode param is undefined ', E_USER_WARNING);
33
34 Yii::app()->loadHelper('sanitize');
35 $sLanguageCode=sanitize_languagecode($sLanguageCode);
36 $streamer = new FileReader(getcwd().DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$sLanguageCode.DIRECTORY_SEPARATOR.'LC_MESSAGES'.DIRECTORY_SEPARATOR.$sLanguageCode.'.mo');
37 $this->gettextclass = new gettext_reader($streamer);
38 $this->langcode = $sLanguageCode;
39 }
40
41 function getlangcode()
42 {
43 return $this->langcode;
44 }
Stack Trace
#0 +
– C:\limesurvey_train\application\libraries\Limesurvey_lang.php(32): trigger_error("langcode param is undefined ", 512)
27 var $gettextclass;
28 var $langcode;
29
30 function limesurvey_lang($sLanguageCode){
31 if(empty($sLanguageCode))
32 trigger_error('langcode param is undefined ', E_USER_WARNING);
33
34 Yii::app()->loadHelper('sanitize');
35 $sLanguageCode=sanitize_languagecode($sLanguageCode);
36 $streamer = new FileReader(getcwd().DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$sLanguageCode.DIRECTORY_SEPARATOR.'LC_MESSAGES'.DIRECTORY_SEPARATOR.$sLanguageCode.'.mo');
37 $this->gettextclass = new gettext_reader($streamer);
#1 +
– C:\limesurvey_train\application\controllers\admin\authentication.php(318): Limesurvey_lang->limesurvey_lang("")
313 {
314 $sLanguage=$user->lang;
315 }
316
317 Yii::app()->session['adminlang'] = $sLanguage;
318 $this->getController()->lang= new limesurvey_lang($sLanguage);
319 }
320
321 /*
322 Checks if the user is using default password
323 */
#2 +
– C:\limesurvey_train\application\controllers\admin\authentication.php(275): Authentication->_setLanguageSettings(User)
270 $user = $identity->getUser();
271
272 Yii::app()->user->login($identity);
273 $this->_checkForUsageOfDefaultPassword();
274 $this->_setSessionData($user);
275 $this->_setLanguageSettings($user);
276
277 return true;
278 }
279
280 /**
#3 +
–
C:\limesurvey_train\application\controllers\admin\authentication.php(260): Authentication->_setLoginSessions(UserIdentity)
255 if (!$identity->authenticate($sOneTimePassword))
256 {
257 return $this->_getAuthenticationFailedErrorMessage();
258 }
259 @session_regenerate_id(); // Prevent session fixation
260 return $this->_setLoginSessions($identity);
261 }
262
263 /*
264 Sets the login sessions
265 * @param UserIdentity $identity
#4 +
–
C:\limesurvey_train\application\controllers\admin\authentication.php(43): Authentication->_doLogin(null, null, "")
38 if ($bCanLogin && !is_array($bCanLogin))
39 {
40 if (Yii::app()->request->getPost('action') || !is_null(Yii::app()->request->getQuery('onepass')) || Yii::app()->getConfig('auth_webserver') === true)
41 {
42
43 $aData = $this->_doLogin(Yii::app()->request->getParam('user'), Yii::app()->request->getPost('password'),Yii::app()->request->getQuery('onepass',''));
44
45 if (!isset($aData['errormsg']))
46 {
47 Failed_login_attempts::model()->deleteAttempts();
48
#5 unknown(0): Authentication->index()
#6 +
–
C:\limesurvey_train\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs(Authentication, array())
102 else if($param->isDefaultValueAvailable())
103 $ps[]=$param->getDefaultValue();
104 else
105 return false;
106 }
107 $method->invokeArgs($object,$ps);
108 return true;
109 }
110 }
#7 +
–
C:\limesurvey_train\application\core\Survey_Common_Action.php(100): CAction->runWithParamsInternal(Authentication, ReflectionMethod, array("r" => "admin/authentication/sa/login", "sa" => "login"))
095 $oMethod = new ReflectionMethod($this, $sDefault);
096 }
097
098 // We're all good to go, let's execute it
099 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
100 return parent::runWithParamsInternal($this, $oMethod, $params);
101 }
102
103 /*
104 Some functions have different parameters, which are just an alias of the
105 * usual parameters we're getting in the url. This function just populates
#8 +
–
C:\limesurvey_train\framework\web\CController.php(309): Survey_Common_Action->runWithParams(array("r" => "admin/authentication/sa/login", "sa" => "login"))
304 {
305 $priorAction=$this->_action;
306 $this->_action=$action;
307 if($this->beforeAction($action))
308 {
309 if($action->runWithParams($this->getActionParams())===false)
310 $this->invalidActionParams($action);
311 else
312 $this->afterAction($action);
313 }
314 $this->_action=$priorAction;
#9 +
–
C:\limesurvey_train\framework\web\CController.php(287): CController->runAction(Authentication)
282 @see runAction
283 /
284 public function runActionWithFilters($action,$filters)
285 {
286 if(empty($filters))
287 $this->runAction($action);
288 else
289 {
290 $priorAction=$this->_action;
291 $this->_action=$action;
292 CFilterChain::create($this,$action,$filters)->run();
#10 +
–
C:\limesurvey_train\framework\web\CController.php(266): CController->runActionWithFilters(Authentication, array())
261 {
262 if(($parent=$this->getModule())===null)
263 $parent=Yii::app();
264 if($parent->beforeControllerAction($this,$action))
265 {
266 $this->runActionWithFilters($action,$this->filters());
267 $parent->afterControllerAction($this,$action);
268 }
269 }
270 else
271 $this->missingAction($actionID);
#11 +
–
C:\limesurvey_train\application\controllers\AdminController.php(169): CController->run("authentication")
164 $this->redirect($this->createUrl('/admin/authentication/sa/login'));
165 }
166
167 }
168
169 return parent::run($action);
170 }
171
172 /*
173 Routes all the actions to their respective places
174 *
#12 +
–
C:\limesurvey_train\framework\web\CWebApplication.php(276): AdminController->run("authentication")
271 {
272 list($controller,$actionID)=$ca;
273 $oldController=$this->_controller;
274 $this->_controller=$controller;
275 $controller->init();
276 $controller->run($actionID);
277 $this->_controller=$oldController;
278 }
279 else
280 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
281 array('{route}'=>$route===''?$this->defaultController:$route)));
#13 +
–
C:\limesurvey_train\framework\web\CWebApplication.php(135): CWebApplication->runController("admin/authentication/sa/login")
130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
131 $_GET[$name]=$value;
132 }
133 else
134 $route=$this->getUrlManager()->parseUrl($this->getRequest());
135 $this->runController($route);
136 }
137
138 /*
139 Registers the core application components.
140 * This method overrides the parent implementation by registering additional core components.
#14 +
–
C:\limesurvey_train\framework\base\CApplication.php(162): CWebApplication->processRequest()
157 */
158 public function run()
159 {
160 if($this->hasEventHandler('onBeginRequest'))
161 $this->onBeginRequest(new CEvent($this));
162 $this->processRequest();
163 if($this->hasEventHandler('onEndRequest'))
164 $this->onEndRequest(new CEvent($this));
165 }
166
167 /**
#15 +
–
C:\limesurvey_train\index.php(178): CApplication->run() |