From 3d3f9aacf1f8beb7b132811a06cef82ef35f0e96 Mon Sep 17 00:00:00 2001 From: Felix Jonas Wiegleb Date: Wed, 25 Mar 2026 13:33:06 +0100 Subject: [PATCH] Mantis #47314 - Forum: Fix TypeError for forum post attachments exceeding upload limit --- components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php index 2fca91a422ad..ca51a75619e8 100755 --- a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php @@ -293,15 +293,17 @@ public function checkInput(): bool public function getInput(): string { + $raw_post_var = (string) ($this->raw($this->getPostVar()) ?? ""); + if ($this->usePurifier() && $this->getPurifier()) { - $value = $this->getPurifier()->purify($this->raw($this->getPostVar())); + $value = $this->getPurifier()->purify($raw_post_var); } else { $allowed = $this->getRteTagString(); if (isset($this->plugins["latex"]) && $this->plugins["latex"] == "latex" && !is_int(strpos($allowed, ""))) { $allowed .= ""; } $value = ($this->getUseRte() || !$this->getUseTagsForRteOnly()) - ? ilUtil::stripSlashes($this->raw($this->getPostVar()), true, $allowed) + ? ilUtil::stripSlashes($raw_post_var, true, $allowed) : $this->str($this->getPostVar()); }