From 6cd6111a13555efefa28e4341e7542f54263be42 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 22 Aug 2016 21:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Connection=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index d2fa3620..c18cec0f 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -351,10 +351,7 @@ abstract class Connection $result = $this->PDOStatement->execute(); // 调试结束 $this->debug(false); - $call = strtolower(substr(trim($sql), 0, 4)); - if (in_array($call, ['call', 'exec'])) { - $procedure = true; - } + $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); return $this->getResult($class, $procedure); } catch (\PDOException $e) { throw new PDOException($e, $this->config, $this->queryStr);