From 2510cbedaad8f064cd4dc5751e0742cb2cfa7141 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 20 Aug 2025 14:41:11 +0300 Subject: [PATCH] Update functions.php --- library/includes/functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/library/includes/functions.php b/library/includes/functions.php index 5cae79005..7af41b25d 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -271,10 +271,7 @@ function auth($type, $forum_id, $ug_data, array $f_access = [], $group_perm = UG $add_auth_type_desc = ($forum_id != AUTH_LIST_ALL); // Check forum existence - if (!forum_exists()) { - return []; - } - if ($add_auth_type_desc && !forum_exists($forum_id)) { + if (!forum_exists() || ($add_auth_type_desc && !forum_exists($forum_id))) { return []; } @@ -1612,7 +1609,7 @@ function get_topic_title($topic_id) function forum_exists($forum_id = null): bool { - if (!isset($forum_id)) { + if ($forum_id === null) { return (bool)DB()->fetch_row("SELECT 1 FROM " . BB_FORUMS . " LIMIT 1"); }