From b3af04d1bcf4dda4032ece6f261a5ba5b0209d80 Mon Sep 17 00:00:00 2001 From: Aaron Bidzan Date: Mon, 13 Apr 2026 10:29:51 +0200 Subject: [PATCH] News: Fix Undefined Logger Property See: https://mantis.ilias.de/view.php?id=47534 ilNewsForContextBlockGUI used $this->logger when logging errors without declaring or initializing the property, which caused an undefined property notice. --- .../ILIAS/News/classes/class.ilNewsForContextBlockGUI.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php b/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php index ef01df98b5c9..bbdb4e99ecff 100755 --- a/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php +++ b/components/ILIAS/News/classes/class.ilNewsForContextBlockGUI.php @@ -57,6 +57,7 @@ class ilNewsForContextBlockGUI extends ilBlockGUI protected bool $prevent_initial_loading = false; protected NewsCollection $collection; + protected ilLogger $logger; public function __construct() { @@ -64,6 +65,7 @@ public function __construct() parent::__construct(); + $this->logger = $DIC->logger()->news(); $this->help = $DIC["ilHelp"]; $this->settings = $DIC->settings(); $this->tabs = $DIC->tabs();