Make form folder optional
When the form folder didn't exist, an exception was thrown that froze the frontend without any error message. Now it is tested whether the form folder in a module is available and only registered in the auotoloader if so. refs #4407
This commit is contained in:
parent
5489c2fa2e
commit
e83526be08
|
@ -227,9 +227,10 @@ class Module
|
|||
$moduleLibraryDir = $this->getLibDir(). '/'. $moduleName;
|
||||
|
||||
$this->app->getLoader()->registerNamespace($moduleName, $moduleLibraryDir);
|
||||
|
||||
if (is_dir($this->getFormDir())) {
|
||||
$this->app->getLoader()->registerNamespace($moduleName. '\\Form', $this->getFormDir());
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue