mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 05:41:52 +09:00
Merge pull request #411 from BelleNottelling/cleanup-exception-spam
This commit is contained in:
3 files changed
+7
-9
No files matched your search
@@ -19,7 +19,9 @@ class Box_AppAdmin extends Box_App
|
||||
{
|
||||
$m = $this->di['mod']($this->mod);
|
||||
$controller = $m->getAdminController();
|
||||
$controller->register($this);
|
||||
if(!is_null($controller)){
|
||||
$controller->register($this);
|
||||
}
|
||||
}
|
||||
|
||||
public function render($fileName, $variableArray = [])
|
||||
|
||||
@@ -165,7 +165,7 @@ class Box_Mod
|
||||
public function getAdminController()
|
||||
{
|
||||
if(!$this->hasAdminController()) {
|
||||
throw new \Box_Exception('Module :mod Admin controller class was not found', array(':mod'=>$this->mod));
|
||||
return null;
|
||||
}
|
||||
$class = 'Box\\Mod\\'.ucfirst($this->mod).'\\Controller\\Admin';
|
||||
$service = new $class();
|
||||
|
||||
@@ -246,14 +246,10 @@ class Service implements InjectionAwareInterface
|
||||
if (!$staff_service->hasPermission($admin, $mod)) {
|
||||
continue;
|
||||
}
|
||||
$m = $this->di['mod']($mod);
|
||||
$obj = $m->getAdminController();
|
||||
|
||||
try {
|
||||
$m = $this->di['mod']($mod);
|
||||
$obj = $m->getAdminController();
|
||||
} catch (\Exception $e) {
|
||||
continue;
|
||||
}
|
||||
if (method_exists($obj, 'fetchNavigation')) {
|
||||
if (!is_null($obj) && method_exists($obj, 'fetchNavigation')) {
|
||||
$n = $obj->fetchNavigation();
|
||||
|
||||
if (isset($n['group'])) {
|
||||
|
||||
Reference in new issue
Block a user