laravel/framework — pull request #2556 by rmasters (2013-10-25 10:12:37+00:00)
Title: Fix Eloquent's builder attempting to iterate over null in withTrashed

When eager-loading a query that contains soft-deleted records, e.g.:

class Model extends Eloquent {
public function related() { return $this->belongsTo('M')->withTrashed(); }
}
Model::with('related')->get();

`Eloquent\Builder::withTrashed()` (line 388) will attempt to iterate over `Query\Builder::$wheres`, which is null by default.

Also fixes laravel/laravel#2225