Description | When click the "Print your answers" link, get this error:
PHP notice
Trying to get property of non-object
C:\xampp\htdocs\ls2\application\helpers\common_helper.php(1776)
1764
1765 /*
1766
1767 @param type $iSurveyID The Survey ID
1768 @param type $sFieldCode Field code of the particular field
1769 @param type $sValue The stored response value
1770 @param object $oLanguage Initialized limesurvey_lang object for the resulting response data
1771 @return string
1772 /
1773 function getExtendedAnswer($iSurveyID, $sFieldCode, $sValue, $oLanguage)
1774 {
1775 if (is_null($sValue) || $sValue=='') return '';
1776 $sLanguage = $oLanguage->langcode;
1777 //Fieldcode used to determine question, $sValue used to match against answer code
1778 //Returns NULL if question type does not suit
1779 if (strpos($sFieldCode, "{$iSurveyID}X")===0) //Only check if it looks like a real fieldcode
1780 {
1781 $fieldmap = createFieldMap($iSurveyID,'short',false,false,$sLanguage);
1782 if (isset($fieldmap[$sFieldCode]))
1783 $fields = $fieldmap[$sFieldCode];
1784 else
1785 return false;
1786 //Find out the question type
1787 $this_type = $fields['type'];
1788 switch($this_type)
Stack Trace
#0
– C:\xampp\htdocs\ls2\application\helpers\common_helper.php(5802): getExtendedAnswer("722461", "id", "1", "en")
5797 }
5798 }
5799 }
5800 else
5801 {
5802 $answer=getExtendedAnswer($iSurveyID,$fname['fieldname'], $idrow[$fname['fieldname']],$sLanguageCode);
5803 $aResultTable[$fname['fieldname']]=array($question,'',$answer);
5804 continue;
5805 }
5806 if (isset($fname['subquestion']))
5807 $subquestion = "{$fname['subquestion']}";
#1
– C:\xampp\htdocs\ls2\application\controllers\PrintanswersController.php(148): getFullResponseTable("722461", "1", "en", true)
143
144 LimeExpressionManager::StartProcessingPage(true); // means that all variables are on the same page
145 // Since all data are loaded, and don't need JavaScript, pretend all from Group 1
146 LimeExpressionManager::StartProcessingGroup(1,($thissurvey['anonymized']!="N"),$surveyid);
147
148 $aFullResponseTable = getFullResponseTable($surveyid,$id,$language,true);
149
150 //Get the fieldmap @TODO: do we need to filter out some fields?
151 unset ($aFullResponseTable['id']);
152 unset ($aFullResponseTable['token']);
153 unset ($aFullResponseTable['lastpage']);
#2
unknown(0): PrintanswersController->actionView("722461", false)
#3
- C:\xampp\htdocs\ls2\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs(PrintanswersController, array("722461", false))
#4
- C:\xampp\htdocs\ls2\framework\web\actions\CInlineAction.php(48): CAction->runWithParamsInternal(PrintanswersController, ReflectionMethod, array("surveyid" => "722461"))
#5
- C:\xampp\htdocs\ls2\framework\web\CController.php(309): CInlineAction->runWithParams(array("surveyid" => "722461"))
#6
- C:\xampp\htdocs\ls2\framework\web\CController.php(287): CController->runAction(CInlineAction)
#7
- C:\xampp\htdocs\ls2\framework\web\CController.php(266): CController->runActionWithFilters(CInlineAction, array())
#8
- C:\xampp\htdocs\ls2\framework\web\CWebApplication.php(276): CController->run("view")
#9
- C:\xampp\htdocs\ls2\framework\web\CWebApplication.php(135): CWebApplication->runController("printanswers/view/surveyid/722461")
#10
- C:\xampp\htdocs\ls2\framework\base\CApplication.php(162): CWebApplication->processRequest()
#11
– C:\xampp\htdocs\ls2\index.php(171): CApplication->run()
166
167 /
168 require_once BASEPATH . 'yii' . EXT;
169 require_once APPPATH . 'core/LSYii_Application' . EXT;
170
171 Yii::createApplication('LSYii_Application', APPPATH . 'config/config' . EXT)->run();
172
173 / End of file index.php /
174 / Location: ./index.php /
|
---|