diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-25 14:54:36 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-25 14:54:36 +0200 |
commit | f6bf9de6def749b26d44a6f8d8ef85d0561cfaf9 (patch) | |
tree | 9982746d76fe35877b8817598edcfba23ff7947a /lib/util.php | |
parent | d1939a1c38390265eaf7b17db05b649af331a673 (diff) | |
download | nextcloud-server-f6bf9de6def749b26d44a6f8d8ef85d0561cfaf9.tar.gz nextcloud-server-f6bf9de6def749b26d44a6f8d8ef85d0561cfaf9.zip |
prevent for returning while false normalize string
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 224ed32061c..1c5a044be8e 100755 --- a/lib/util.php +++ b/lib/util.php @@ -833,7 +833,12 @@ class OC_Util { */ public static function normalizeUnicode($value) { if(class_exists('Patchwork\PHP\Shim\Normalizer')) { - $value = \Patchwork\PHP\Shim\Normalizer::normalize($value); + $normalizedValue = \Patchwork\PHP\Shim\Normalizer::normalize($value); + if($normalizedValue === false) { + \OC_Log::write( 'core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN); + } else { + $value = $normalizedValue; + } } return $value; |