aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2020-01-01 17:45:42 +0100
committerMarc Alexander <admin@m-a-styles.de>2020-01-01 17:45:42 +0100
commitb9193f35c1d964e3445d3933d877be3049954411 (patch)
treec58c61fdafd26ae861a20a88312868ddc1d23632
parent43e5337a0ad83e5146d3e322b4e119b65c4ac766 (diff)
parentcf450bd01fcdb100ffd2f50ef6e2040156edc887 (diff)
downloadforums-b9193f35c1d964e3445d3933d877be3049954411.tar
forums-b9193f35c1d964e3445d3933d877be3049954411.tar.gz
forums-b9193f35c1d964e3445d3933d877be3049954411.tar.bz2
forums-b9193f35c1d964e3445d3933d877be3049954411.tar.xz
forums-b9193f35c1d964e3445d3933d877be3049954411.zip
Merge pull request #5807 from 3D-I/ticket/16273
[ticket/16273] Check whether the index exists in memberlist - PHP 7.4
-rw-r--r--phpBB/memberlist.php7
1 files 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'])