diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php index 0d4c7c3ae16..83416d83be0 100755 --- a/src/Illuminate/Database/Query/Builder.php @@ -398,7 +398,7 @@ if ( ! $value instanceof Expression) { - $this->bindings[] = $value; + $this->bindings[] = is_array($value) ? head($value) : $value; } return $this; @@ -477,7 +477,7 @@ $this->wheres[] = compact('column', 'type', 'boolean', 'not'); - $this->bindings = array_merge($this->bindings, $values); + $this->bindings = array_merge($this->bindings, array_slice($values, 0, 2)); return $this; } @@ -846,6 +846,7 @@ { $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); + $value = is_array($value) ? head($value) : $value; $this->bindings[] = $value; return $this; @@ -941,7 +942,7 @@ $this->havings[] = compact('type', 'column', 'operator', 'value'); - $this->bindings[] = $value; + $this->bindings[] = is_array($value) ? head($value) : $value; return $this; }