Skip to content

Commit 1d64cb7

Browse files
author
Admin
committed
Avoid division by 0 on getEmptyPaginatedResponse
1 parent e651853 commit 1d64cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/ResourceControllerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ protected function getEmptyPaginatedResponse(array $request): JsonResponse
260260
{
261261
$data = [
262262
'items' => [],
263-
'perPage' => \max(0, $request['limit'] ?? 10),
263+
'perPage' => \max(1, $request['limit'] ?? 10),
264264
'currentPage' => 1,
265265
];
266266

0 commit comments

Comments
 (0)