From 3a1cf0bb9a5c7ffd6521a737d7e18195fa323b3f Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 2 Nov 2016 10:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Query=E7=B1=BBgetJoinTable?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= 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 91af4997..b238610d 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -694,7 +694,7 @@ class Query $alias = $join; } } - if (false === strpos($table, '.') && 0 !== strpos($table, $prefix) && 0 !== strpos($table, '__')) { + if ($prefix && false === strpos($table, '.') && 0 !== strpos($table, $prefix) && 0 !== strpos($table, '__')) { $table = $this->getTable($table); } }