Skip to content

Commit

Permalink
修正Model类hasWhere方法
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Feb 7, 2017
1 parent 7f6102d commit a3a37e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/think/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ public static function hasWhere($relation, $where = [])
$model = new static();
$relation = $model->$relation();
if ($relation instanceof HasMany) {
return $model->$relation()->hasWhere($where);
return $relation->hasWhere($where);
} else {
return $relation;
}
Expand Down

0 comments on commit a3a37e6

Please sign in to comment.