From b72caee28beec82a522e048805648c887fb97ec5 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 24 Jan 2018 19:19:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/relation/MorphTo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/model/relation/MorphTo.php b/library/think/model/relation/MorphTo.php index ee0ba57a..504130a4 100644 --- a/library/think/model/relation/MorphTo.php +++ b/library/think/model/relation/MorphTo.php @@ -52,7 +52,7 @@ class MorphTo extends Relation { $morphType = $this->morphType; $model = $this->parseModel($this->parent->$morphType); - return (new $model)->db()->getModel(); + return (new $model); } /**