framework: [5.8] Argument 1 passed to Illuminate\Database\Query\Builder::cleanBindings() must be of the type array, null given
- Laravel Version: 5.8.12
- PHP Version: 7.2.14
- Database Driver & Version: MySQL 5.7.20
Description:
Just this morning upgraded from 5.8.11 to 5.8.12 which completely broke my application on the wherePivot part.
Broken:
$variable = $user->books()->wherePivot('owner', true)->findOrFail($id);
Fixed:
$variable = $user->books()->wherePivot('owner', '=', true)->findOrFail($id);
Has this been done intentionally? I cannot find anything regarding this change inside the core update. My code has not changed since the upgrade from 5.8.11 -> 5.8.12
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 15 (8 by maintainers)
Lucky i am using
withPivotValue()method which internally uses