Skip to content

Firefly III: a personal finances manager

Make sure that null|string passed is always a string

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