From 925f073b05b47dbe6a609e12b1e2d56e694b3fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E9=B8=BF=E8=95=8A?= Date: Wed, 15 May 2019 17:28:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DQuery=20getPk=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=88=A4=E6=96=ADtable=E5=AD=97=E6=AE=B5=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index ac4adea1..bb16a1f5 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1952,7 +1952,7 @@ class Query if (!empty($this->pk)) { $pk = $this->pk; } else { - $pk = $this->getTableInfo(is_array($options) ? $options['table'] : $options, 'pk'); + $pk = $this->getTableInfo(is_array($options) && isset($options['table']) ? $options['table'] : $options, 'pk'); } return $pk; }