PHP notice

Trying to get property of non-object

/home/sondages.pro/htdocs/demonstrations/demonstration/application/helpers/common_helper.php(203)

191     $timeadjust = getGlobalSetting('timeadjust');
192     App()->setLanguage((isset(Yii::app()->session['adminlang']) ? Yii::app()->session['adminlang'] : 'en'));
193 
194     if(is_null($cached)) {
195         $surveyidresult = Survey::model()
196             ->permission(Yii::app()->user->getId())
197             ->with('defaultlanguage')
198             ->findAll(array('order'=>'surveyls_title'));
199 
200         $surveynames = array();
201         foreach ($surveyidresult as $result)
202         {
203             $surveynames[] = array_merge($result->attributes, $result->defaultlanguage->attributes);
204         }
205 
206         $cached = $surveynames;
207     } else {
208         $surveynames = $cached;
209     }
210     $surveyselecter = "";
211     if ($returnarray===true) return $surveynames;
212     $activesurveys='';
213     $inactivesurveys='';
214     $expiredsurveys='';
215     if ($surveynames)

Stack Trace

#0
+
 /home/sondages.pro/htdocs/demonstrations/demonstration/application/controllers/admin/surveyadmin.php(50): getSurveyList(true)
45     * @return void
46     */
47     public function index()
48     {
49         App()->getClientScript()->registerPackage('jqgrid');
50         if (count(getSurveyList(true)) == 0)
51         {
52             $this->_renderWrappedTemplate('super', 'firststeps');
53         } else {
54             App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . "listsurvey.js");
55             Yii::app()->loadHelper('surveytranslator');
#3
+
 /home/sondages.pro/htdocs/demonstrations/demonstration/application/core/Survey_Common_Action.php(99): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array())
094             $oMethod = new ReflectionMethod($this, $sDefault);
095         }
096 
097         // We're all good to go, let's execute it
098         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
099         return parent::runWithParamsInternal($this, $oMethod, $params);
100     }
101 
102     /**
103     * Some functions have different parameters, which are just an alias of the
104     * usual parameters we're getting in the url. This function just populates
#7
+
 /home/sondages.pro/htdocs/demonstrations/demonstration/application/controllers/AdminController.php(164): CController->run("survey")
159                     $this->redirect(array('/admin/authentication/sa/login'));
160                 }
161 
162             }
163 
164             return parent::run($action);
165     }
166 
167     /**
168     * Routes all the actions to their respective places
169     *
2015-09-16 15:13:20 Apache/2.2.22 (Debian) Yii Framework/1.1.15