From ac8adcb9a653a8815bea9bc8509cb44a3bae78e8 Mon Sep 17 00:00:00 2001 From: lavigor Date: Wed, 6 Jun 2018 03:58:33 +0300 Subject: [PATCH] [ticket/13713] Properly handle empty colour strings PHPBB3-13713 --- phpBB/phpbb/textformatter/s9e/mention_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/textformatter/s9e/mention_helper.php b/phpBB/phpbb/textformatter/s9e/mention_helper.php index 96bc896bad..0348809cbc 100644 --- a/phpBB/phpbb/textformatter/s9e/mention_helper.php +++ b/phpBB/phpbb/textformatter/s9e/mention_helper.php @@ -126,7 +126,7 @@ class mention_helper { $attributes['profile_url'] = str_replace('{USER_ID}', $attributes['user_id'], $user_profile_url); - if (isset($this->cached_colors['users'][$attributes['user_id']])) + if (!empty($this->cached_colors['users'][$attributes['user_id']])) { $attributes['color'] = $this->cached_colors['users'][$attributes['user_id']]; } @@ -135,7 +135,7 @@ class mention_helper { $attributes['profile_url'] = str_replace('{GROUP_ID}', $attributes['group_id'], $group_profile_url); - if (isset($this->cached_colors['groups'][$attributes['group_id']])) + if (!empty($this->cached_colors['groups'][$attributes['group_id']])) { $attributes['color'] = $this->cached_colors['groups'][$attributes['group_id']]; }