Skip to content

Commit

Permalink
Fixed issue #11502: Popup editor does not launch. Error in DOM naming
Browse files Browse the repository at this point in the history
Fixed issue: Problem with inserting new subquestions in a postgresql environment.
Dev: Added a check to prevent non-numeric id-values to be checked against the database to prevent postgresql type errors
  • Loading branch information
markusfluer committed Jul 28, 2016
1 parent f13c6c4 commit 480939a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions application/core/Survey_Common_Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ private function _addPseudoParams($params)
// iGroupId/gid can be found with qid/iQuestionId
if(isset($params['iQuestionId']))
{
$oQuestion=Question::model()->find("qid=:qid",array(":qid"=>$params['iQuestionId']));//Move this in model to use cache
if($oQuestion)
{
$params['iGroupId']=$params['gid']=$oQuestion->gid;
if((int) $params['iQuestionId'] >0 )
{ //Check if the transfered iQuestionId is numeric to prevent Errors with postgresql
$oQuestion=Question::model()->find("qid=:qid",array(":qid"=>$params['iQuestionId']));//Move this in model to use cache
if($oQuestion)
{
$params['iGroupId']=$params['gid']=$oQuestion->gid;
}
}
}
// iSurveyId/iSurveyID/sid can be found with gid/iGroupId
Expand Down

0 comments on commit 480939a

Please sign in to comment.