Skip to content

Commit

Permalink
fix!: change $limit default value from 0 to null
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 30, 2023
1 parent 4348749 commit d19bf0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ abstract protected function doFindColumn(string $columnName);
*
* @return array
*/
abstract protected function doFindAll(int $limit = 0, int $offset = 0);
abstract protected function doFindAll(?int $limit = null, int $offset = 0);

/**
* Returns the first row of the result set.
Expand Down Expand Up @@ -594,7 +594,7 @@ public function findColumn(string $columnName)
*
* @return array
*/
public function findAll(int $limit = 0, int $offset = 0)
public function findAll(?int $limit = null, int $offset = 0)
{
if ($this->tempAllowCallbacks) {
// Call the before event and check for a return
Expand Down
2 changes: 1 addition & 1 deletion system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ protected function doFindColumn(string $columnName)
* @return array
* @phpstan-return list<row_array|object>
*/
protected function doFindAll(int $limit = 0, int $offset = 0)
protected function doFindAll(?int $limit = null, int $offset = 0)
{
$builder = $this->builder();

Expand Down

0 comments on commit d19bf0d

Please sign in to comment.