diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 6fb2dfbb9a..ee3dffd461 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -236,7 +236,12 @@ class acp_bbcodes trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING); } - if (strlen($bbcode_font_icon) > 64 || preg_match('/^[\w-]+$/', $bbcode_font_icon)) + if (strlen($bbcode_font_icon) > 64) + { + trigger_error($user->lang['BBCODE_FONT_ICON_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING); + } + + if (!empty($bbcode_font_icon) && !preg_match('/^[\w-]+$/', $bbcode_font_icon)) { trigger_error($user->lang['BBCODE_FONT_ICON_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 5ce331388d..6420f9aa19 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -55,8 +55,8 @@ $lang = array_merge($lang, array( 'BBCODE_HELPLINE_TOO_LONG' => 'The help line you entered is too long.', 'BBCODE_FONT_ICON' => 'BBCode icon', 'BBCODE_FONT_ICON_EXPLAIN' => 'Enter the name of a Font Awesome icon (without the fa prefix) to display instead of the BBCode name appearing on the button. %1$sClick here%2$s to view the list of available icons. Only solid style icons are supported.', - 'BBCODE_FONT_ICON_INVALID' => 'The icon name you have entered is too long.', - + 'BBCODE_FONT_ICON_INVALID' => 'The icon name you have entered is invalid.', + 'BBCODE_FONT_ICON_TOO_LONG' => 'The icon name you have entered is too long.', 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', 'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.', 'BBCODE_INVALID_TEMPLATE' => 'Your BBCode’s template is invalid.',