Skip to content

Commit

Permalink
bugfix: the Language to be set MUST not be NULL
Browse files Browse the repository at this point in the history
otherwise a TypeError Exception is raised:

TypeError thrown with message "Argument 1 passed to ilObjUser::setLanguage() must be of the type string, null given, called in /.../Services/User/classes/class.ilUserImportParser.php on line 467"

Stacktrace:
ILIAS-eLearning#16 TypeError in /.../Services/User/classes/class.ilObjUser.php:1479
ILIAS-eLearning#15 ilObjUser:setLanguage in /.../Services/User/classes/class.ilUserImportParser.php:467
ILIAS-eLearning#14 ilUserImportParser:importBeginTag in /.../Services/User/classes/class.ilUserImportParser.php:364
ILIAS-eLearning#13 ilUserImportParser:handlerBeginTag in [internal]:0
  • Loading branch information
Uwe Tesche authored Jul 18, 2022
1 parent f541acf commit 0589b3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Services/User/classes/class.ilUserImportParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public function importBeginTag(
$ilias->ini->readVariable("layout", "style")
);

$this->userObj->setLanguage($a_attribs["Language"]);
$this->userObj->setLanguage($a_attribs["Language"] ?? '');
$this->userObj->setImportId($a_attribs["Id"]);
$this->action = (is_null($a_attribs["Action"])) ? "Insert" : $a_attribs["Action"];
$this->currPassword = null;
Expand Down

0 comments on commit 0589b3e

Please sign in to comment.