From: Silvio Rhatto Date: Wed, 30 Aug 2023 23:12:31 +0000 (-0300) Subject: Merge branch 'master' of github.com:rhatto/SemanticScuttle X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=HEAD;p=semanticscuttle.git Merge branch 'master' of github.com:rhatto/SemanticScuttle --- 01ebd549e71c82f3df2a7663255001b7c5521aca diff --cc src/SemanticScuttle/Service/Bookmark.php index 40a2b67,ea8762d..8a8946a --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@@ -736,7 -734,11 +736,11 @@@ class SemanticScuttle_Service_Bookmark $tags = explode('+', trim($tags)); } + if(!is_array($tags)) { + $tags = []; + } + - $tagcount = count($tags); + $tagcount = empty($tags) ? 0 : count($tags); for ($i = 0; $i < $tagcount; $i ++) { $tags[$i] = trim($tags[$i]); } @@@ -854,8 -856,12 +858,12 @@@ $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;