]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Utils.php
Apply the new system (Bookmark + Service) to the whole code base
[github/shaarli/Shaarli.git] / application / Utils.php
index 925e1a22c909011a342b3dc3ced3c9f0f5d9a3da..56f5b9a20d8b33b9fa3c06fd6f819931100d4545 100644 (file)
@@ -162,7 +162,7 @@ function generateLocation($referer, $host, $loopTerms = array())
     $finalReferer = '?';
 
     // No referer if it contains any value in $loopCriteria.
-    foreach ($loopTerms as $value) {
+    foreach (array_filter($loopTerms) as $value) {
         if (strpos($referer, $value) !== false) {
             return $finalReferer;
         }