You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My livewire component expects to receive a collection or null, when receiving null and running the test, using the @forelse directive, it reports an error in the test saying that "Illuminate\View\ViewException: foreach() argument must be of type array|object, null given", adding an if around foreach works normally, follow images for better viewing.
public ?Collection $comments = null;
How to Reproduce
Sample Repository
No response
Pest Version
v2.34.7
PHP Version
8.3
Operation System
Windows
Notes
No response
The text was updated successfully, but these errors were encountered:
What Happened
My livewire component expects to receive a collection or null, when receiving null and running the test, using the @forelse directive, it reports an error in the test saying that "Illuminate\View\ViewException: foreach() argument must be of type array|object, null given", adding an if around foreach works normally, follow images for better viewing.
public ?Collection $comments = null;
How to Reproduce
Sample Repository
No response
Pest Version
v2.34.7
PHP Version
8.3
Operation System
Windows
Notes
No response
The text was updated successfully, but these errors were encountered: