Skip to content

Commit 324d0b2

Browse files
cconard96cedric-anne
authored andcommitted
fix handling search data from plugin hooks
1 parent 296beba commit 324d0b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Search/Provider/SQLProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public static function getDefaultSelectCriteria(string $itemtype): array
114114
// Plugin can override core definition for its type
115115
if ($plug = isPluginItemType($itemtype)) {
116116
$default_select = \Plugin::doOneHook($plug['plugin'], 'addDefaultSelect', $itemtype);
117-
if ($default_select !== "") {
117+
if (!empty($default_select)) {
118118
$ret[] = new QueryExpression(rtrim($default_select, ' ,'));
119119
}
120120
}
@@ -979,7 +979,7 @@ public static function getDefaultWhereCriteria(string $itemtype): array
979979
// Plugin can override core definition for its type
980980
if ($plug = isPluginItemType($itemtype)) {
981981
$default_where = \Plugin::doOneHook($plug['plugin'], 'addDefaultWhere', $itemtype);
982-
if ($default_where !== '') {
982+
if (!empty($default_where)) {
983983
$criteria = [new QueryExpression($default_where)];
984984
}
985985
}

0 commit comments

Comments
 (0)