diff options
| author | Murtaza Sultani <sultani@data-quest.de> | 2025-07-14 12:42:13 +0200 |
|---|---|---|
| committer | Murtaza Sultani <sultani@data-quest.de> | 2025-07-14 12:42:13 +0200 |
| commit | 74076ca20b80311c19f3b32870f1c8eba82bc09d (patch) | |
| tree | 80bcb0d7b58269e947c006e6a51cc8b94c1938be /lib/functions.php | |
| parent | c76e8045a8113b3d5837459c521371921a592279 (diff) | |
Resolve "Forum funktioniert nicht mehr an Einrichtungen"
Closes #5700
Merge request studip/studip!4351
Diffstat (limited to 'lib/functions.php')
| -rw-r--r-- | lib/functions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/functions.php b/lib/functions.php index cd52968..0849162 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -107,16 +107,18 @@ function get_object_name($range_id, $object_type) * Returns a sorm object for a given range_id * * @param string the range_id - * @return bool|SimpleORMap Course/Institute/User/Statusgruppen/ + * @return Course | Institute | User | null */ -function get_object_by_range_id($range_id) { +function get_object_by_range_id($range_id): Course | Institute | User | null +{ $possible_sorms = "Course Institute User"; foreach(words($possible_sorms) as $sorm) { if ($object = $sorm::find($range_id)) { return $object; } } - return false; + + return null; } /** |
