]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Smilies.php
Continued:
[friendica.git] / src / Content / Smilies.php
index 01ac832eac8c71dff739de5183d55763cbed71cf..c0fc195f98368a2fa656855f4de70c5666c7a475 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2023, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -224,10 +224,10 @@ class Smilies
                        if (strlen($word) < 2) {
                                continue;
                        }
-                       $ord1 = ord($word);
+                       $ord1 = ord($word[0]);
                        $ord2 = ord($word[1]);
                        // A smiley shortcode must not begin or end with whitespaces.
-                       if (ctype_space($ord1) || ctype_space($word[strlen($word) - 1])) {
+                       if (ctype_space($word[0]) || ctype_space($word[strlen($word) - 1])) {
                                continue;
                        }
                        $ord1_bitset |= 1 << ($ord1 & 31);