diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-09 14:41:45 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-11 10:24:31 +0200 |
commit | 59209e0f2b3376c7a03df393fc731ca99ced1213 (patch) | |
tree | b796222bd10d9b626f8bc0d76ae342a88ca9d92e /lib/private/util.php | |
parent | bfebbe47decd30389e0325e24ecefc98fe3e8d71 (diff) | |
download | nextcloud-server-59209e0f2b3376c7a03df393fc731ca99ced1213.tar.gz nextcloud-server-59209e0f2b3376c7a03df393fc731ca99ced1213.zip |
use intl's native normalizer_normalize() in case the module is available
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index a130d997ca3..79f3eb7b48c 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1402,13 +1402,11 @@ class OC_Util { * @return bool|string */ public static function normalizeUnicode($value) { - if (class_exists('Patchwork\PHP\Shim\Normalizer')) { - $normalizedValue = \Patchwork\PHP\Shim\Normalizer::normalize($value); - if ($normalizedValue === false) { - \OC_Log::write('core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN); - } else { - $value = $normalizedValue; - } + $normalizedValue = normalizer_normalize($value); + if ($normalizedValue === null || $normalizedValue === false) { + \OC_Log::write('core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN); + } else { + $value = $normalizedValue; } return $value; |