Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-25 16:54:36 +0400
committerFlorin Peter <github@florin-peter.de>2013-05-25 16:54:36 +0400
commitf6bf9de6def749b26d44a6f8d8ef85d0561cfaf9 (patch)
tree9982746d76fe35877b8817598edcfba23ff7947a /lib/util.php
parentd1939a1c38390265eaf7b17db05b649af331a673 (diff)
prevent for returning while false normalize string
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php7
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;