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]; }