From 3664e46d2f3cf6f0c70d224e62a220d2de81d195 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 31 Aug 2017 16:57:50 +0800 Subject: [PATCH] =?UTF-8?q?Pivot=E6=9E=B6=E6=9E=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/Pivot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/model/Pivot.php b/library/think/model/Pivot.php index 06c6b181..259a8a03 100644 --- a/library/think/model/Pivot.php +++ b/library/think/model/Pivot.php @@ -28,7 +28,7 @@ class Pivot extends Model * @param array|object $data 数据 * @param string $table 中间数据表名 */ - public function __construct(Model $parent, $data = [], $table = '') + public function __construct(Model $parent = null, $data = [], $table = '') { $this->parent = $parent;