Skip to content

Commit

Permalink
Fixed issue: Error on unknown fields in survey_language_settings when…
Browse files Browse the repository at this point in the history
… importing survey from Cloud hosting
  • Loading branch information
c-schmitz committed Dec 7, 2021
1 parent 1241eb7 commit f7deb99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions application/helpers/admin/import_helper.php
Expand Up @@ -1337,6 +1337,8 @@ function XMLImportSurvey($sFullFilePath, $sXMLdata = null, $sNewSurveyName = nul
if (isset($insertdata['surveyls_attributecaptions']) && substr($insertdata['surveyls_attributecaptions'], 0, 1) != '{') {
unset($insertdata['surveyls_attributecaptions']);
}
$aColumns = SurveyLanguageSetting::model()->attributes;
$insertdata = array_intersect_key($insertdata, $aColumns);

if (!SurveyLanguageSetting::model()->insertNewSurvey($insertdata)) {
throw new Exception(gT("Error") . ": Failed to import survey language settings - data is invalid<br />");
Expand Down

0 comments on commit f7deb99

Please sign in to comment.