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; + } } /**