Skip to content

Commit

Permalink
Merge pull request #51 from ggoffy/master
Browse files Browse the repository at this point in the history
fixed warning
  • Loading branch information
ggoffy authored May 21, 2020
2 parents ef1a189 + 248a1e6 commit 92c38da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/search.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function wggallery_search($queryarray, $andor, $limit, $offset, $userid)
if (is_array($queryarray)) {
$count = count($queryarray);
}

if (is_array($queryarray) && $count > 0) {
$criteriaKeywords = new CriteriaCompo();
$elementCount = count($queryarray);
Expand All @@ -75,10 +76,10 @@ function wggallery_search($queryarray, $andor, $limit, $offset, $userid)
}

$critSearch = new CriteriaCompo();
if (null !== $criteriaUser) {
if (isset($criteriaUser)) {
$critSearch->add($criteriaUser, 'AND');
}
if (null !== $criteriaKeywords) {
if (isset($criteriaKeywords)) {
$critSearch->add($criteriaKeywords, 'AND');
}
$critSearch->setLimit($limit);
Expand Down Expand Up @@ -122,10 +123,10 @@ function wggallery_search($queryarray, $andor, $limit, $offset, $userid)
}

$critSearch = new CriteriaCompo();
if (null !== $criteriaUser) {
if (isset($criteriaUser)) {
$critSearch->add($criteriaUser, 'AND');
}
if (null !== $criteriaKeywords) {
if (isset($criteriaKeywords)) {
$critSearch->add($criteriaKeywords, 'AND');
}
$critSearch->setLimit($limit);
Expand Down

0 comments on commit 92c38da

Please sign in to comment.