Skip to content

Commit

Permalink
Update SaveForm.php
Browse files Browse the repository at this point in the history
attempt to fix schmunk42#222
  • Loading branch information
cebe authored Apr 23, 2018
1 parent 55898bd commit ba87feb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/helpers/SaveForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit ba87feb

Please sign in to comment.