diff --git a/Modules/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExportTableGUI.php b/Modules/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExportTableGUI.php index 02ae873f3ba9..b3c960d8e43b 100644 --- a/Modules/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExportTableGUI.php +++ b/Modules/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExportTableGUI.php @@ -89,7 +89,7 @@ protected function fillRow(array $a_set) : void } $this->tpl->parseCurrentBlock(); $this->tpl->setVariable('CB_ID', $this->counter); - $this->tpl->setVariable("PHRASE", $a_set["phrase"]); + $this->tpl->setVariable("PHRASE", $a_set["phrase"] ?? ""); $this->tpl->setVariable("FILENAME", ilLegacyFormElementsUtil::prepareFormOutput($a_set['file'])); $this->tpl->setVariable("SIZE", $a_set["size"]); $this->tpl->setVariable("DATE", $a_set["date"]); diff --git a/Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php b/Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php index cbcf1622cf9f..eb9f2414da10 100755 --- a/Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php +++ b/Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php @@ -502,9 +502,9 @@ public function getImportDirectory() : string * export questions to xml * @todo move to export sub-component */ - public function toXML(array $questions) : string + public function toXML(?array $questions) : string { - if (count($questions) === 0) { + if (is_null($questions) || count($questions) === 0) { $questions = $this->getQuestions(); } $a_xml_writer = new ilXmlWriter();