]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Merge branch 'master' of github.com:rhatto/SemanticScuttle master
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 30 Aug 2023 23:12:31 +0000 (20:12 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 30 Aug 2023 23:12:31 +0000 (20:12 -0300)
1  2 
src/SemanticScuttle/Service/Bookmark.php

index 40a2b671e80dbc42bb4964ffc70f0a4da15c8de8,ea8762d6a5f7dbd09a74b011c70231da3c5440ab..8a8946aaa16a1b34822efd6eba6eecf609dfca60
@@@ -736,7 -734,11 +736,11 @@@ class SemanticScuttle_Service_Bookmark 
              $tags = explode('+', trim($tags));
          }
  
 -        $tagcount = count($tags);
+         if(!is_array($tags)) {
+             $tags = [];
+         }
 +        $tagcount = empty($tags) ? 0 : count($tags);
          for ($i = 0; $i < $tagcount; $i ++) {
              $tags[$i] = trim($tags[$i]);
          }
              $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)) {
 +            if (!empty($tags)) {
                  $query_2 .= ' LEFT JOIN '. $b2tservice->getTableName() .' AS T'
                      . ' ON B.bId = T.bId';
                  $dotags = true;