From ba87feba271bb9c1b4d7be69b565302d7a2d1224 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Mon, 23 Apr 2018 10:08:28 +0200 Subject: [PATCH] Update SaveForm.php attempt to fix #222 --- src/helpers/SaveForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helpers/SaveForm.php b/src/helpers/SaveForm.php index f9240f21..de1b2b89 100644 --- a/src/helpers/SaveForm.php +++ b/src/helpers/SaveForm.php @@ -58,7 +58,11 @@ public static function loadSavedForms($generatorName) if (method_exists($module, 'getBasePath')) { $basePath = $module->getBasePath(); } else { - $reflector = new \ReflectionClass($module['class']); + if (is_array($module)) { + $reflector = new \ReflectionClass($module['class']; + } else { + $reflector = new \ReflectionClass($module); + } $basePath = StringHelper::dirname($reflector->getFileName()); } $basePath .= '/gii';