Additional context
Below is the raw query triggered by the laravel eager loading.
I dump out the type, subquery and query bindings in the getInAndNotInClauses function and found out that the InRaw's value is not in the query bindings so that cause the currentBinding calculation goes wrong.
I add a check before adding the current binding, and it seems to work fine.
if (Str::startsWith($subquery, $values->first())) {
$this->currentBinding += count($where["values"]);
}
Describe the bug I get a
Undefined offset: 6
error after the eloquent query called below.Eloquent Query Please provide the complete eloquent query that caused the bug, for example:
Stack Trace
Environment
Additional context Below is the raw query triggered by the laravel eager loading.![screenshot 2020-04-13 下午7 24 24](https://user-images.githubusercontent.com/26425896/79119745-ac3d1380-7dc3-11ea-92e6-f70f77a029e2.png)
I dump out the type, subquery and query bindings in the![screenshot 2020-04-13 下午8 15 59](https://user-images.githubusercontent.com/26425896/79119962-36857780-7dc4-11ea-88fe-87eb5f38df1a.png)
getInAndNotInClauses
function and found out that theInRaw
's value is not in the query bindings so that cause the currentBinding calculation goes wrong.I add a check before adding the current binding, and it seems to work fine.