diff --git a/src/Command/Database/DatabaseLogBase.php b/src/Command/Database/DatabaseLogBase.php index 075ca661e..182d9b117 100644 --- a/src/Command/Database/DatabaseLogBase.php +++ b/src/Command/Database/DatabaseLogBase.php @@ -182,7 +182,7 @@ protected function makeQuery($offset = null, $range = 1000) $query->orderBy('wid', 'ASC'); - if ($offset) { + if ($offset !== null) { $query->range($offset, $range); } diff --git a/src/Command/Debug/DatabaseLogCommand.php b/src/Command/Debug/DatabaseLogCommand.php index 10d69b85f..eaaf1f6a5 100644 --- a/src/Command/Debug/DatabaseLogCommand.php +++ b/src/Command/Debug/DatabaseLogCommand.php @@ -149,7 +149,15 @@ private function getEventDetails() */ private function getAllEvents() { - $query = $this->makeQuery(); + if (!$this->offset) { + $this->offset = 0; + } + + if (!$this->limit) { + $this->limit = 1000; + } + + $query = $this->makeQuery($this->offset, $this->limit); $result = $query->execute();