diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index 599430cc611..ae20bf7857d 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -1206,12 +1206,12 @@ protected function nestWheresForScope(QueryBuilder $query, $originalWhereCount) $query->wheres = []; - $this->sliceWhereConditions($query, $allWheres, 0, $originalWhereCount); - $this->sliceWhereConditions($query, $allWheres, $originalWhereCount); + $this->addNestedWhereSlice($query, $allWheres, 0, $originalWhereCount); + $this->addNestedWhereSlice($query, $allWheres, $originalWhereCount); } /** - * Create a slice of where conditions at the given offsets and nest them if needed. + * Slice where conditions at the given offset and add them to the query as a nested condition. * * @param \Illuminate\Database\Query\Builder $query * @param array $wheres @@ -1219,7 +1219,7 @@ protected function nestWheresForScope(QueryBuilder $query, $originalWhereCount) * @param int $length * @return void */ - protected function sliceWhereConditions(QueryBuilder $query, $wheres, $offset, $length = null) + protected function addNestedWhereSlice(QueryBuilder $query, $wheres, $offset, $length = null) { $whereSlice = array_slice($wheres, $offset, $length);