Skip to content

Commit

Permalink
#8700 Complete support for the Laravel result set at the DAOResultFac…
Browse files Browse the repository at this point in the history
…tory

(cherry picked from commit d9c1a6f)
  • Loading branch information
jonasraoni committed May 30, 2024
1 parent 41e5643 commit 692b616
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/db/DAOResultFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
namespace PKP\db;

use APP\submission\DAO;
use Countable;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Collection;
use Illuminate\Support\Enumerable;
Expand Down Expand Up @@ -208,9 +209,8 @@ public function eof()
if ($this->records == null) {
return true;
}
/** @var DAOResultIterator */
$records = $this->records;
return !$records->valid();

return $this->records instanceof Countable ? !count($this->records) : !$this->records->valid();
}

/**
Expand Down

0 comments on commit 692b616

Please sign in to comment.