From f4de0d17ccbfadde1a1f63345dde3a5a3137486e Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 6 Jun 2023 15:54:32 +0700 Subject: [PATCH] Fixed null $u_data if user not found (#783) --- library/includes/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/includes/functions.php b/library/includes/functions.php index 1d33da2ca..a02c1d00e 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -991,6 +991,10 @@ function get_userdata($u, $force_name = false, $allow_guest = false) } } + if (is_null($u_data)) { + return false; + } + if ($u_data['user_id'] == GUEST_UID) { CACHE('bb_cache')->set('guest_userdata', $u_data); }