We have two instances on Limesurvey running. Both are v2.06+ and have been running smoothly for years.
Now we are getting this error when people with admin access attempt to visit the admin page (.../index.php/admin/):
PHP notice
Trying to get property of non-object
.../application/helpers/common_helper.php(148)
Code:
136 if(is_null($cached)) {
137 $args = array('order'=>'surveyls_title');
138 if (!Permission::model()->hasGlobalPermission('superadmin','read'))
139 {
140 $surveyidresult = Survey::model()->permission(Yii::app()->user->getId())->with('defaultlanguage')->findAll($args);
141 } else {
142 $surveyidresult = Survey::model()->with('defaultlanguage')->findAll($args);
143 }
144
145 $surveynames = array();
146 foreach ($surveyidresult as $result)
147 {
148 $surveynames[] = array_merge($result->attributes, $result->defaultlanguage->attributes);
149 }
150
151 $cached = $surveynames;
152 } else {
153 $surveynames = $cached;
154 }
155 $surveyselecter = "";
156 if ($returnarray===true) return $surveynames;
157 $activesurveys='';
158 $inactivesurveys='';
159 $expiredsurveys='';
160 if ($surveynames)
The surveys themselves seem fine, just the admin page has the error. It is only happening with one of our instances, which seems very odd. They are both hosted on the same server (CentOS).
The only difference between them is one is secured and requires survey respondents to authenticate - this version works fine. The non-secured instance is the one returning the above error.
Thank you
Jeff J