Skip to content

Commit

Permalink
Dev: PHP notice if surveyid is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Sep 26, 2013
1 parent 238143d commit 5d0ae9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/survey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ function _loadRequiredHelpersAndLibraries()

function _loadLimesurveyLang($mvSurveyIdOrBaseLang)
{
if ( is_numeric($mvSurveyIdOrBaseLang))
if ( is_numeric($mvSurveyIdOrBaseLang) && Survey::model()->find($mvSurveyIdOrBaseLang))
{
$baselang = Survey::model()->findByPk($mvSurveyIdOrBaseLang)->language;
$baselang = Survey::model()->find($mvSurveyIdOrBaseLang)->language;
}
elseif (!empty($mvSurveyIdOrBaseLang))
{
Expand Down

0 comments on commit 5d0ae9a

Please sign in to comment.