Fatal Error: Type of App\Filters\EventFilter::$filters
Must Be Array
#8
Labels
bug
Something isn't working
App\Filters\EventFilter::$filters
Must Be Array
#8
Issue Description:
When using the
EventFilter
class that extendsFilterable\Filter
, a fatal error occurs due to a type mismatch with the property$filters
. The error states that$filters
must be of type array, as expected by theFilterable\Filter
class, but it appears to be set to a different type or not properly initialized as an array.Error Message:
Steps to Reproduce:
EventFilter
class that extendsFilterable\Filter
.$filters
.Expected Behavior:
The
EventFilter
class should be able to declare$filters
as an array, and the filter functionality should work as intended without any type errors.Actual Behavior:
A fatal error is thrown because of a type mismatch, preventing the proper use of the filtering functionality.
Code Snippet:
The
EventFilter
class is defined as follows:Possible Solution:
Ensure that
$filters
is properly typed as an array. If there are default values or initialisations, they should be in an array format. For example:Additional Context:
The text was updated successfully, but these errors were encountered: