From 7739eb2cfe914d7661ff2d9afcb0b4ab8c1ce931 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 4 Jul 2023 14:49:10 +0200 Subject: [PATCH] [ticket/9687] Fix incorrect check for ban end and invalid query PHPBB3-9687 --- phpBB/phpbb/ban/manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/ban/manager.php b/phpBB/phpbb/ban/manager.php index 8c77c67eab..d4c8383a1f 100644 --- a/phpBB/phpbb/ban/manager.php +++ b/phpBB/phpbb/ban/manager.php @@ -230,7 +230,7 @@ class manager foreach ($ban_rows as $ban_row) { - if ($ban_row['end'] > 0 && $ban_row['end'] < time()) + if (!$ban_row['end'] || $ban_row['end'] > time()) { if (stripos($ban_row['item'], '*') === false) { @@ -310,7 +310,7 @@ class manager $where_array[] = ['AND', [ ['b.ban_item', '=', 'u.' . $user_column], - ['b.ban_mode', '=', $ban_mode->get_type()], + ['b.ban_mode', '=', "'{$ban_mode->get_type()}'"], ], ]; }