From cf450bd01fcdb100ffd2f50ef6e2040156edc887 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Wed, 1 Jan 2020 02:11:19 +0100 Subject: [ticket/16273] Check whether the index exists in memberlist - PHP 7.4 PHPBB3-16273 --- phpBB/memberlist.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 35c218cd8c..e933b54c17 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -653,11 +653,12 @@ switch ($mode) FROM ' . ZEBRA_TABLE . " WHERE zebra_id = $user_id AND user_id = {$user->data['user_id']}"; - $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); - $foe = (bool) $row['foe'] ?? false; - $friend = (bool) $row['friend'] ?? false; + + $foe = $row ? (bool) $row['foe'] : false; + $friend = $row ? (bool) $row['friend'] : false; + $db->sql_freeresult($result); if ($config['load_onlinetrack']) -- cgit v1.2.1