From 10b828ac62e35020de486caeede610f5eab9f821 Mon Sep 17 00:00:00 2001 From: Matthias Grief Date: Fri, 13 Dec 2024 23:25:30 +0100 Subject: [PATCH] =?UTF-8?q?Wertpr=C3=BCfung=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webseite/classes/Task.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webseite/classes/Task.php b/webseite/classes/Task.php index 0aecb01..8b0e3ea 100644 --- a/webseite/classes/Task.php +++ b/webseite/classes/Task.php @@ -20,7 +20,14 @@ class Task public function __construct(string $text, array $variables) { $this->text = $text; - $this->variables = $variables; + $this->variables = array(); + foreach ($variables as $variable => $value) { + if(!is_string($value)) { + continue; + } + + $this->variables[$variable] = $value; + } } /**