Skip to content

Commit

Permalink
fixed #33018: Pre8: Export of Survey Question Pool fails ilObjSurveyQ…
Browse files Browse the repository at this point in the history
…uestionPool::toXML(): Argument #1 () must be of type array…
  • Loading branch information
alex40724 committed Jun 23, 2022
1 parent 8a95af8 commit 6cb0247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6cb0247

Please sign in to comment.