From 33d408c196b781a0946780503bbbed130c6a7d4c Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Mon, 30 Sep 2024 15:53:32 +0200 Subject: [PATCH] User: Fix Error On Second E-Mail = Null See: https://mantis.ilias.de/view.php?id=42185 --- Services/User/classes/class.ilObjUser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Services/User/classes/class.ilObjUser.php b/Services/User/classes/class.ilObjUser.php index c6fb0f6e3a13..5729eaf86d46 100755 --- a/Services/User/classes/class.ilObjUser.php +++ b/Services/User/classes/class.ilObjUser.php @@ -3085,10 +3085,11 @@ public function getProfileAsString(ilLanguage $language): string if (strlen($this->getFax())) { $body .= ($language->txt("fax") . ": " . $this->getFax() . "\n"); } - if (strlen($this->getEmail())) { + if ($this->getEmail() !== '') { $body .= ($language->txt("email") . ": " . $this->getEmail() . "\n"); } - if (strlen($this->getSecondEmail())) { + if ($this->getSecondEmail() !== null + && $this->getSecondEmail() !== '') { $body .= ($language->txt("second_email") . ": " . $this->getSecondEmail() . "\n"); } if (strlen($this->getHobby())) {