From 3f814116de4820afd0bb48a607c5e08bd3fe4185 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 17 May 2020 15:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E8=A3=85=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/command/install/InstallProjectCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extend/catcher/command/install/InstallProjectCommand.php b/extend/catcher/command/install/InstallProjectCommand.php index 184a3bb..a89ac98 100644 --- a/extend/catcher/command/install/InstallProjectCommand.php +++ b/extend/catcher/command/install/InstallProjectCommand.php @@ -193,7 +193,7 @@ class InstallProjectCommand extends Command { foreach (CatchAdmin::getModulesDirectory() as $directory) { $moduleInfo = CatchAdmin::getModuleInfo($directory); - if (is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { + if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { $output = Console::call('catch-migrate:run', [$moduleInfo['alias']]); $this->output->info(sprintf('module [%s] migrations %s', $moduleInfo['alias'], $output->fetch())); @@ -207,7 +207,7 @@ class InstallProjectCommand extends Command { foreach (CatchAdmin::getModulesDirectory() as $directory) { $moduleInfo = CatchAdmin::getModuleInfo($directory); - if (is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { + if (!empty($moduleInfo) && is_dir(CatchAdmin::moduleMigrationsDirectory($moduleInfo['alias']))) { $rollbackOut = Console::call('catch-migrate:rollback', [$moduleInfo['alias'], '-f']); // $this->output->info(sprintf('module [%s] [%s] rollback %s', $moduleInfo['alias'], basename($migration), $rollbackOut->fetch())); }