Skip to content

Commit 330e15f

Browse files
authored
Merge pull request #334 from irvine1231/master
Skip adding currentBinding if the where values are not in the query binding
2 parents 82be9a1 + 227517c commit 330e15f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CacheKey.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ protected function getInAndNotInClauses(array $where) : string
234234
$type = strtolower($where["type"]);
235235
$subquery = $this->getValuesFromWhere($where);
236236
$values = collect($this->query->bindings["where"][$this->currentBinding] ?? []);
237-
$this->currentBinding += count($where["values"]);
237+
238+
if (Str::startsWith($subquery, $values->first())) {
239+
$this->currentBinding += count($where["values"]);
240+
}
238241

239242
if (! is_numeric($subquery) && ! is_numeric(str_replace("_", "", $subquery))) {
240243
try {

0 commit comments

Comments
 (0)