From dd67e42ae86ce509b227c01a77cd5ca64f18d0d9 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Thu, 5 Mar 2026 12:17:49 -0500 Subject: [PATCH] php deprecations plus a bug fix Bug: // make sure Super Admins are always allowed if (! in_array($allowed_groups, 1)) { oops! if (! in_array(1, $allowed_groups)) { --- system/user/addons/forum/mod.forum.php | 2 ++ system/user/addons/forum/mod.forum_core.php | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/system/user/addons/forum/mod.forum.php b/system/user/addons/forum/mod.forum.php index c326803..6691b53 100644 --- a/system/user/addons/forum/mod.forum.php +++ b/system/user/addons/forum/mod.forum.php @@ -43,6 +43,7 @@ class Forum public $cur_thread_row = 0; public $thread_post_total = 0; // Used for new entry submission to determine redirect page number public $trigger_error_page = false; + public $trigger_login_page = false; public $is_table_open = false; public $preview_override = false; public $mbr_class_loaded = false; @@ -53,6 +54,7 @@ class Forum public $spellcheck_enabled = false; public $feeds_enabled = null; public $feed_ids = ''; + public $date_limit = ''; public $realm = "ExpressionEngine Forums"; public $auth_attempt = false; public $use_sess_id = 0; // Used in calls to ee()->functions->fetch_site_index() in certain URLs, like attachments diff --git a/system/user/addons/forum/mod.forum_core.php b/system/user/addons/forum/mod.forum_core.php index 9a98f84..3757978 100644 --- a/system/user/addons/forum/mod.forum_core.php +++ b/system/user/addons/forum/mod.forum_core.php @@ -6180,7 +6180,8 @@ public function move_reply() } if (false !== (strpos($new_topic_id, "/"))) { - $new_topic_id = end(explode("/", $new_topic_id)); + $new_topic_id_parts = explode("/", $new_topic_id); + $new_topic_id = end($new_topic_id_parts); } if (! is_numeric($new_topic_id)) { @@ -6491,7 +6492,8 @@ public function do_merge() } if (false !== (strpos($merge_id, "/"))) { - $merge_id = end(explode("/", $merge_id)); + $merge_id_parts = explode("/", $merge_id); + $merge_id = end($merge_id_parts); } if (! is_numeric($merge_id)) { @@ -9523,7 +9525,7 @@ public function http_authentication_check_digest($allowed_groups = array()) } // make sure Super Admins are always allowed - if (! in_array($allowed_groups, 1)) { + if (! in_array(1, $allowed_groups)) { $allowed_groups[] = 1; }