From bb9efc851f319464e7b7c9431d3da4840bf432e6 Mon Sep 17 00:00:00 2001 From: forecho Date: Tue, 22 Mar 2016 15:14:20 +0800 Subject: [PATCH] fix bug --- models/MeritTemplate.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models/MeritTemplate.php b/models/MeritTemplate.php index 4ff7ada..a482dee 100644 --- a/models/MeritTemplate.php +++ b/models/MeritTemplate.php @@ -134,7 +134,9 @@ public static function getRuleKeys() public static function getTypes() { - return Module::getInstance()->types; + /** @var Module $merit */ + $merit = Yii::$app->getModule('merit'); + return $merit->types; } public static function getStatuses() @@ -144,4 +146,4 @@ public static function getStatuses() self::STATUS_DELETE => '停用', ]; } -} \ No newline at end of file +}