Make sure that null|string passed is always a string

This commit is contained in:
James Cole
2025-10-10 20:54:31 +02:00
parent 57617b750f
commit 9d1fb2cd6a

View File

@@ -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',
];