From 34cd277c25995f66b036f4098eab3634bd23be56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 1 Sep 2020 00:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Annotation/Annotation.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/system/Annotation/Annotation.php b/system/Annotation/Annotation.php index 5e27e65b..13a4a042 100644 --- a/system/Annotation/Annotation.php +++ b/system/Annotation/Annotation.php @@ -244,10 +244,13 @@ class Annotation extends BaseAnnotation */ public function __get($name) { - if (isset($this->_classMap[$name])) { - return Snowflake::createObject($this->_classMap[$name]); + if (!isset($this->_classMap[$name])) { + return parent::__get($name); // TODO: Change the autogenerated stub } - return parent::__get($name); // TODO: Change the autogenerated stub + if (!is_object($this->_classMap[$name])) { + $this->_classMap[$name] = Snowflake::createObject($this->_classMap[$name]); + } + return $this->_classMap[$name]; }