Commit 4924058a authored by Tom29's avatar Tom29 Committed by GitHub

Return null if there's no record

parent e6cbe903
......@@ -438,7 +438,8 @@ class dbObject {
$this->db->pageLimit = self::$pageLimit;
$res = $this->db->paginate ($this->dbTable, $page, $fields);
self::$totalPages = $this->db->totalPages;
if ($this->db->count == 0) return null;
foreach ($res as &$r) {
$this->processArrays ($r);
$this->data = $r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment