Skip to content

Commit 4924058

Browse files
authored
Return null if there's no record
1 parent e6cbe90 commit 4924058

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dbObject.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ private function paginate ($page, $fields = null) {
438438
$this->db->pageLimit = self::$pageLimit;
439439
$res = $this->db->paginate ($this->dbTable, $page, $fields);
440440
self::$totalPages = $this->db->totalPages;
441-
441+
if ($this->db->count == 0) return null;
442+
442443
foreach ($res as &$r) {
443444
$this->processArrays ($r);
444445
$this->data = $r;

0 commit comments

Comments
 (0)