Skip to content

Commit

Permalink
Dev: Fixed issue #12807: Produced 404 due to error in survey broke wi…
Browse files Browse the repository at this point in the history
…th template

Dev: put Dev : not need to be in changelog
  • Loading branch information
Shnoulle committed Oct 19, 2017
1 parent 1a85585 commit 86f098d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/models/TemplateConfiguration.php
Expand Up @@ -68,8 +68,11 @@ public function setTemplateConfiguration($sTemplateName='', $iSurveyId='')
$this->iSurveyId = (int) $iSurveyId;

if ($sTemplateName==''){
$this->sTemplateName = Yii::app()->getConfig('defaulttemplate');
$this->oSurvey = Survey::model()->findByPk($iSurveyId);
$this->sTemplateName = $this->oSurvey->template;
if($this->oSurvey) {
$this->sTemplateName = $this->oSurvey->template;
}
}

// We check if it's a CORE template
Expand Down

0 comments on commit 86f098d

Please sign in to comment.