From 325c9cd17e63c09e5042e8e28fbc28997668660c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hives=20A=CC=81ron?= Date: Tue, 10 Jul 2018 19:43:01 +0200 Subject: [PATCH] Fix asciiToShortnameCallback Fix PHP function asciiToShortnameCallback replacement --- lib/php/src/Client.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/php/src/Client.php b/lib/php/src/Client.php index e74bc9e9b..0f9e1073b 100644 --- a/lib/php/src/Client.php +++ b/lib/php/src/Client.php @@ -342,7 +342,6 @@ public function asciiToShortnameCallback($m) $ruleset = $this->getRuleset(); $ascii_replace = $ruleset->getAsciiReplace(); - $shortcode_replace = array_flip(array_reverse($ruleset->getShortcodeReplace())); $shortname = $m[3]; if ( empty($ascii_replace[$shortname]) ) @@ -351,8 +350,7 @@ public function asciiToShortnameCallback($m) } else { - $unicode = $ascii_replace[$shortname]; - return $m[2].$shortcode_replace[$unicode]; + return $m[2].$ascii_replace[$shortname]; } } }