summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/util.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 3178639b02e..ec3640503e4 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1274,14 +1274,17 @@ class OC_Util {
* @return bool|string
*/
public static function normalizeUnicode($value) {
- $normalizedValue = normalizer_normalize($value);
+ if(Normalizer::isNormalized($value)) {
+ return $value;
+ }
+
+ $normalizedValue = Normalizer::normalize($value);
if ($normalizedValue === null || $normalizedValue === false) {
- \OC_Log::write('core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN);
- } else {
- $value = $normalizedValue;
+ \OC::$server->getLogger()->warning('normalizing failed for "' . $value . '"', ['app' => 'core']);
+ return $value;
}
- return $value;
+ return $normalizedValue;
}
/**