From 1b7a03a008b15df2518799789fb96e0e0096a250 Mon Sep 17 00:00:00 2001 From: Matheus Zych Date: Fri, 19 Jun 2026 15:24:31 +0200 Subject: [PATCH] ItemGroup: Fix active record issue See: https://mantis.ilias.de/view.php?id=31861 This is a follow up to the original commit to fix a issue with active records trying to assign a null value to $display and $toggleable_initially of ilItemGroupAR --- .../ILIAS/ItemGroup/classes/class.ilItemGroupAR.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ILIAS/ItemGroup/classes/class.ilItemGroupAR.php b/components/ILIAS/ItemGroup/classes/class.ilItemGroupAR.php index b6603b6a7b5c..0ebfcffefbad 100755 --- a/components/ILIAS/ItemGroup/classes/class.ilItemGroupAR.php +++ b/components/ILIAS/ItemGroup/classes/class.ilItemGroupAR.php @@ -57,7 +57,7 @@ public static function returnDbTableName(): string * @con_length 255 * @con_is_notnull yes */ - protected string $display = self::DISPLAY_WITH_TITLE; + protected ?string $display = self::DISPLAY_WITH_TITLE; /** * @var string @@ -67,7 +67,7 @@ public static function returnDbTableName(): string * @con_length 255 * @con_is_notnull yes */ - protected string $toggleable_initially = self::DISPLAY_WITH_TITLE_AND_TOGGLEABLE_INITIALLY_OPEN; + protected ?string $toggleable_initially = self::DISPLAY_WITH_TITLE_AND_TOGGLEABLE_INITIALLY_OPEN; /** * @var string @@ -101,7 +101,7 @@ public function setId(int $id): void public function getDisplay(): string { - return $this->display; + return $this->display ?? self::DISPLAY_WITH_TITLE; } public function setDisplay(string $a_val): void @@ -111,7 +111,7 @@ public function setDisplay(string $a_val): void public function getDisplayWithTitleAndToggleableInitially(): string { - return $this->toggleable_initially; + return $this->toggleable_initially ?? self::DISPLAY_WITH_TITLE_AND_TOGGLEABLE_INITIALLY_OPEN; } public function setDisplayWithTitleAndToggleableInitially(string $a_val): void