From 5cc285f4fde9909f483cc98fbf33c9e60b6aa566 Mon Sep 17 00:00:00 2001 From: Yunlong <384345134@qq.com> Date: Fri, 13 Jan 2017 19:04:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=20module=20=E6=97=B6=EF=BC=8C=E6=8A=A5=20runAction=20on=20NULL?= =?UTF-8?q?=20=E7=9A=84=20bug=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Queue.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Queue.php b/src/Queue.php index 2f25b61..428e538 100644 --- a/src/Queue.php +++ b/src/Queue.php @@ -122,7 +122,11 @@ abstract class Queue extends \yii\base\Component public function init() { parent::init(); - $this->module = \Yii::$app->getModule($this->module); + if($this->module) { + $this->module = \Yii::$app->getModule($this->module); + } else { + $this->module = \Yii::$app; + } } /**