Skip to content

Commit

Permalink
Dev: added default title for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 30, 2017
1 parent 3982f7e commit ad41d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/frontend_helper.php
Expand Up @@ -1755,7 +1755,7 @@ function breakOutAndCrash($sTemplateViewPath, $totalquestions, $iTotalGroupsWith
renderError($sTitle, $sMessage, $thissurvey, $sTemplateViewPath);
}

function renderError($sTitle, $sMessage, $thissurvey, $sTemplateViewPath )
function renderError($sTitle='', $sMessage, $thissurvey, $sTemplateViewPath )
{
// Template settings
$surveyid = $thissurvey['sid'];
Expand All @@ -1765,7 +1765,7 @@ function renderError($sTitle, $sMessage, $thissurvey, $sTemplateViewPath )
Yii::app()->twigRenderer->setForcedPath($sTemplateViewPath);

$aError = array();
$aError['title'] = $sTitle;
$aError['title'] = ($sTitle != '')?$sTitle:gT("This survey cannot be tested or completed for the following reason(s):");
$aError['message'] = $sMessage;
$thissurvey['aError'] = $aError;

Expand Down

0 comments on commit ad41d5a

Please sign in to comment.