From 9d1fb2cd6aee56836d5c8293185fbcd70025d6bb Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 10 Oct 2025 20:54:31 +0200 Subject: [PATCH] Make sure that null|string passed is always a string --- app/Api/V1/Requests/PaginationRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Api/V1/Requests/PaginationRequest.php b/app/Api/V1/Requests/PaginationRequest.php index 93374a2d84..8fe7cf351f 100644 --- a/app/Api/V1/Requests/PaginationRequest.php +++ b/app/Api/V1/Requests/PaginationRequest.php @@ -47,7 +47,7 @@ class PaginationRequest extends ApiRequest public function rules(): array { return [ - 'sort' => ['nullable', new IsValidSortInstruction($this->sortClass)], + 'sort' => ['nullable', new IsValidSortInstruction((string)$this->sortClass)], 'limit' => 'numeric|min:1|max:131337', 'page' => 'numeric|min:1|max:131337', ];