From bed3bf64485c5560e50d35750ca2dbc2303809c8 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Thu, 25 Aug 2022 02:05:34 +0800 Subject: [PATCH] fix get_user_name without werarning medal --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index e4d902d0..7499bea3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3711,7 +3711,7 @@ function get_username($id, $big = false, $link = true, $bold = true, $target = f //medal $medalHtml = ''; - foreach ($arr['wearing_medals'] as $medal) { + foreach ($arr['wearing_medals'] ?? [] as $medal) { $medalHtml .= sprintf( '', $medal['image_large'], $medal['name'], $medalClass, $medalSize, $medalSize, $marginLeft