]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/TagsAssigner.php
Replace continue; with break; to avoid PHP 7.3 warnings
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / TagsAssigner.php
index a2fb0b9a940c25588ec7d588b0ee0922daccb47d..519150f539f89441c88cf37740e7fd2a7bce18ae 100644 (file)
@@ -32,7 +32,7 @@ class TagsAssigner
     {
         $tagsEntities = [];
 
-        if (!is_array($tags)) {
+        if (!\is_array($tags)) {
             $tags = explode(',', $tags);
         }
 
@@ -45,11 +45,11 @@ class TagsAssigner
         }
 
         foreach ($tags as $label) {
-            $label = trim($label);
+            $label = trim(mb_convert_case($label, MB_CASE_LOWER));
 
             // avoid empty tag
-            if (0 === strlen($label)) {
-                continue;
+            if (0 === \strlen($label)) {
+                break;
             }
 
             if (isset($tagsNotYetFlushed[$label])) {