View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06209Bug reportsInstallationpublic2012-07-19 23:34
Reporteruser20373Assigned ToDenisChenu  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.00RC2 
Fixed in Version2.00RC4 
Summary06209: Error upon submission
Description

After a new installation of 2.00RC2 I tried to submit a form but ended up with an error. $oLanguage was not an object in getExtendedAnswer() in application/helpers/common_helper.php.
As far as I can tell the forth parameter to getExtendedAnswer() was a string ($sLanguage) instead of an object.
I could fix the problem by adding the following line in getExtendedAnswer() but this might not be the cleanest solution:

if(!is_object($oLanguage)) $oLanguage = new Limesurvey_lang($oLanguage);

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120528
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5
Server OS (if known)Debian 6.0.5
Webserver software & version (if known)Apache 2.2.16
PHP Version5.2.16

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2012-06-14 02:04

developer   ~19247

What form did you try to send ?

user20373

2012-06-14 13:05

  ~19251

I can not make the form publicly available but I can attach the stack trace, which might give you more insight.
As far as I can tell, the problem is in common_helper.php in line 5781 where getExtendedAnswer() is called with $sLanguage as forth parameter where it should be a lang object $oLanguage.

Let me know if you need any other information.


PHP notice

Trying to get property of non-object

/usr/www/users/chopen/umfrage/application/helpers/common_helper.php(1777)

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 //if(!is_object($oLanguage)) $oLanguage = new Limesurvey_lang($oLanguage);
1777 $sLanguage = $oLanguage->langcode;
1778 //Fieldcode used to determine question, $sValue used to match against answer code
1779 //Returns NULL if question type does not suit
1780 if (strpos($sFieldCode, "{$iSurveyID}X")===0) //Only check if it looks like a real fieldcode
1781 {
1782 $fieldmap = createFieldMap($iSurveyID,'short',false,false,$sLanguage);
1783 if (isset($fieldmap[$sFieldCode]))
1784 $fields = $fieldmap[$sFieldCode];
1785 else
1786 return false;
1787 //Find out the question type
1788 $this_type = $fields['type'];
1789 switch($this_type)

Stack Trace
#0

/usr/www/users/chopen/umfrage/application/helpers/common_helper.php(5781): getExtendedAnswer("631835", "id", "19", "de")

5776 }
5777 }
5778 }
5779 else
5780 {
5781 $answer=getExtendedAnswer($iSurveyID,$fname['fieldname'], $idrow[$fname['fieldname']],$sLanguageCode);
5782 $aResultTable[$fname['fieldname']]=array($question,'',$answer);
5783 continue;
5784 }
5785 if (isset($fname['subquestion']))
5786 $subquestion = "{$fname['subquestion']}";

#1

/usr/www/users/chopen/umfrage/application/helpers/frontend_helper.php(1238): getFullResponseTable("631835", "19", "de")

1233 $aEmailResponseTo[]=$sRecipient;
1234 }
1235 }
1236 }
1237
1238 $aFullResponseTable=getFullResponseTable($surveyid,$SESSION['survey'.$surveyid]['srid'],$SESSION['survey'.$surveyid]['s_lang']);
1239 $ResultTableHTML = "<table class='printouttable' >\n";
1240 $ResultTableText ="\n\n";
1241 $oldgid = 0;
1242 $oldqid = 0;
1243 foreach ($aFullResponseTable as $sFieldname=>$fname)

#2

/usr/www/users/chopen/umfrage/application/helpers/SurveyRuntimeHelper.php(422): sendSubmitNotifications("631835")

417 submittokens();
418 }
419
420 //Send notifications
421
422 sendSubmitNotifications($surveyid);
423
424
425 $content = '';
426
427 $content .= templatereplace(file_get_contents("$thistpl/startpage.pstpl"), array(), $redata);

#3
+
/usr/www/users/chopen/umfrage/application/controllers/survey/index.php(671): SurveyRuntimeHelper->run("631835", array("surveyid" => "631835", "thistpl" => "/usr/www/users/chopen/umfrage/upload/templates/ossstudie2012", "totalquestions" => null, "thissurvey" => array("surveyls_survey_id" => "631835", "surveyls_language" => "de", "surveyls_title" => "Open Source Studie 2012", "surveyls_description" => "<b>Sehr geehrte Damen und Herren</b><br /> <div>  </div>...", ...), ...))
#4
+
/usr/www/users/chopen/umfrage/application/controllers/survey/index.php(18): index->action()
#5
+
/usr/www/users/chopen/umfrage/framework/web/actions/CAction.php(75): index->run()
#6
+
/usr/www/users/chopen/umfrage/framework/web/CController.php(309): CAction->runWithParams(array())
#7
+
/usr/www/users/chopen/umfrage/framework/web/CController.php(287): CController->runAction(index)
#8
+
/usr/www/users/chopen/umfrage/framework/web/CController.php(266): CController->runActionWithFilters(index, array())
#9
+
/usr/www/users/chopen/umfrage/framework/web/CWebApplication.php(276): CController->run("index")
#10
+
/usr/www/users/chopen/umfrage/framework/web/CWebApplication.php(135): CWebApplication->runController("survey/index")
#11
+
/usr/www/users/chopen/umfrage/framework/base/CApplication.php(162): CWebApplication->processRequest()
#12
+
/usr/www/users/chopen/umfrage/index.php(171): CApplication->run()


DenisChenu

DenisChenu

2012-06-15 11:16

developer   ~19271

OK,

Thinks it's already done.
See GIT version or wait for RC3.

Issue History

Date Modified Username Field Change
2012-06-13 08:15 user20373 New Issue
2012-06-14 02:04 DenisChenu Note Added: 19247
2012-06-14 13:05 user20373 Note Added: 19251
2012-06-15 11:16 DenisChenu Note Added: 19271
2012-06-15 11:16 DenisChenu Assigned To => DenisChenu
2012-06-15 11:16 DenisChenu Status new => feedback
2012-06-23 18:51 DenisChenu Status feedback => resolved
2012-06-23 18:51 DenisChenu Fixed in Version => 2.00RC4
2012-06-23 18:51 DenisChenu Resolution open => fixed
2012-07-19 23:34 c_schmitz Status resolved => closed