From 1d997428ede69fd8869725081835ea29a8c5e207 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Mon, 25 Apr 2022 10:21:20 +0000 Subject: [PATCH] fix relation blubberthread on Statusgruppen model and sanitize return value of... Closes #955 --- lib/models/BlubberStatusgruppeThread.php | 2 +- lib/models/Statusgruppen.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/models/BlubberStatusgruppeThread.php b/lib/models/BlubberStatusgruppeThread.php index cbe9aee4f2b..57f1d29b3da 100644 --- a/lib/models/BlubberStatusgruppeThread.php +++ b/lib/models/BlubberStatusgruppeThread.php @@ -30,7 +30,7 @@ class BlubberStatusgruppeThread extends BlubberThread return $thread; } } - return false; + return null; } public function isReadable(string $user_id = null) diff --git a/lib/models/Statusgruppen.php b/lib/models/Statusgruppen.php index d064259cfcd..873386ab1f3 100644 --- a/lib/models/Statusgruppen.php +++ b/lib/models/Statusgruppen.php @@ -75,6 +75,7 @@ class Statusgruppen extends SimpleORMap implements PrivacyObject ]; $config['has_one']['blubberthread'] = [ 'class_name' => BlubberStatusgruppeThread::class, + 'assoc_func' => 'findByStatusgruppe_id', 'on_store' => 'store', 'on_delete' => 'delete' ]; -- GitLab