]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Do not pass a null to `count`.
authorJason <jasonmm.github@gmail.com>
Tue, 21 Jun 2022 23:20:58 +0000 (18:20 -0500)
committerJason <jasonmm.github@gmail.com>
Tue, 21 Jun 2022 23:56:02 +0000 (18:56 -0500)
src/SemanticScuttle/Service/Bookmark.php

index 13153503bf39d54c114095a7666e588a084ca1fc..ea8762d6a5f7dbd09a74b011c70231da3c5440ab 100644 (file)
@@ -734,6 +734,10 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
             $tags = explode('+', trim($tags));
         }
 
+        if(!is_array($tags)) {
+            $tags = [];
+        }
+
         $tagcount = count($tags);
         for ($i = 0; $i < $tagcount; $i ++) {
             $tags[$i] = trim($tags[$i]);
@@ -852,6 +856,10 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
             $aTerms = explode(' ', $terms);
             $aTerms = array_map('trim', $aTerms);
 
+            if(!is_array($tags)){
+                $tags = [];
+            }
+
             // Search terms in tags as well when none given
             if (!count($tags)) {
                 $query_2 .= ' LEFT JOIN '. $b2tservice->getTableName() .' AS T'