8000 [8.x] QueryBuilder `cleanBindings` refactoring lead to "Array to string conversion" error · Issue #39553 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[8.x] QueryBuilder cleanBindings refactoring lead to "Array to string conversion" error #39553

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

Closed
nuernbergerA opened this issue Nov 9, 2021 · 1 comment

Comments

@nuernbergerA
Copy link
Contributor
  • Laravel Version: v8.70.0
  • PHP Version: 8.0.12
  • Database Driver & Version: sqlite 3.35.5 (but doesn't really matter)

Description:

Since #39492 cleanBindings() will have a different output then before because of toArray() instead of all() and result in a Array to string conversion error in some cases.

Steps To Reproduce:

Given a User model with a settings field that is casted to a collection

User::query()->insertOrIgnore([
    ['username' => 'driesvints', 'settings' => collect(['macUser' => true])],
    ['username' => 'nuernbergerA', 'settings' => collect(['macUser' => false])],
]);
@taylorotwell
Copy link
Member

I think I can just safely update that from toArray to all. Will push a fix.

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

2 participants
0