Skip to content

Commit 80337b2

Browse files
committed
check for CriteriaCompo
1 parent 3d8e459 commit 80337b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

class/TagHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public function getCount(\CriteriaElement $criteria = null)
387387
$modid = (int)($modid);
388388
*/
389389
$sql = "SELECT COUNT(DISTINCT o.{$this->keyName})" . " FROM {$this->table} AS o LEFT JOIN {$this->table_link} AS l ON l.{$this->keyName} = o.{$this->keyName}";
390-
if ((null !== $criteria) && $criteria instanceof \CriteriaElement) {
390+
if (($criteria instanceof \CriteriaCompo) || ($criteria instanceof \Criteria)) {
391391
$sql .= ' ' . $criteria->renderWhere();
392392
}
393393
/*
@@ -428,7 +428,7 @@ public function getItems(\CriteriaElement $criteria = null)
428428
$start = Constants::BEGINNING;
429429
$sort = '';
430430
$order = '';
431-
if ((null !== $criteria) && $criteria instanceof \CriteriaElement) {
431+
if (($criteria instanceof \CriteriaCompo) || ($criteria instanceof \Criteria)) {
432432
$sql .= ' ' . $criteria->renderWhere();
433433
$sort = $criteria->getSort();
434434
$order = $criteria->getOrder();

0 commit comments

Comments
 (0)