From afa348bc463e9b91993ba7adfa3a03d4bd20aabb Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 27 Sep 2016 17:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84getOpt?= =?UTF-8?q?ions=E6=96=B9=E6=B3=95=20=E5=BD=93name=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=94?= =?UTF-8?q?=E5=9B=9Enull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 19696646..bae75765 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1487,7 +1487,11 @@ class Query */ public function getOptions($name = '') { - return isset($this->options[$name]) ? $this->options[$name] : $this->options; + if ('' === $name) { + return $this->options; + } else { + return isset($this->options[$name]) ? $this->options[$name] : null; + } } /**