Skip to content

[PHP 8.3.13] - Overloaded object of type Illuminate\Support\Carbon is not compatible with RecursiveArrayIterator #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cbaconnier opened this issue Nov 19, 2024 · 0 comments

Comments

@cbaconnier
Copy link
Contributor

Since the bugfix introduced with PHP 8.3.13: php/php-src#15918

When we retrieve Carbon objects we get the error:

Overloaded object of type Illuminate\Support\Carbon is not compatible with RecursiveArrayIterator

At this line:

!empty(array_filter(iterator_to_array($values, false), function ($value) use ($builder) {

I'm not sure what the ideal way to fix this. Currently I did this fix on my own branch.
I haven't tried yet to understand why we need a RecursiveArrayIterator and my fix will cast anything it can to a string and drop what it can't. That the reason I haven't opened a PR.

My fix: 3ef8971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant