aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-10-28 20:22:57 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-10-28 20:22:57 +0100
commit1e67ffee1d5c2bec5d06acd574db949b58db0221 (patch)
tree6232546a13ebb494427a1036c28b537b3d92b851 /phpBB/includes/acp/acp_forums.php
parent40a69b8edf54101537ac037d43da3cfe4f41c616 (diff)
parentc0eee6d153f63faf5231edd03ee8e5c5412d41dc (diff)
downloadforums-1e67ffee1d5c2bec5d06acd574db949b58db0221.tar
forums-1e67ffee1d5c2bec5d06acd574db949b58db0221.tar.gz
forums-1e67ffee1d5c2bec5d06acd574db949b58db0221.tar.bz2
forums-1e67ffee1d5c2bec5d06acd574db949b58db0221.tar.xz
forums-1e67ffee1d5c2bec5d06acd574db949b58db0221.zip
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 8f55f64da0..e3979632c2 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -986,10 +986,20 @@ class acp_forums
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
}
- // No Emojis
+ /**
+ * Replace Emojis and other 4bit UTF-8 chars not allowed by MySql to UCR / NCR.
+ * Using their Numeric Character Reference's Hexadecimal notation.
+ */
+ $forum_data_ary['forum_name'] = utf8_encode_ucr($forum_data_ary['forum_name']);
+
+ /**
+ * This should never happen again.
+ * Leaving the fallback here just in case there will be the need of it.
+ */
if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $forum_data_ary['forum_name'], $matches))
{
$character_list = implode('<br>', $matches[0]);
+
$errors[] = $user->lang('FORUM_NAME_EMOJI', $character_list);
}