mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
Hook: throw exceptions for missing classes
We are otherwise not catching the resulting fatal errors right now
This commit is contained in:
parent
52c3e5d8dd
commit
edcc698e1e
@ -109,6 +109,13 @@ class Hook
|
|||||||
}
|
}
|
||||||
|
|
||||||
$class = self::$hooks[$name][$key];
|
$class = self::$hooks[$name][$key];
|
||||||
|
|
||||||
|
if (! class_exists($class)) {
|
||||||
|
throw new ProgrammingError(
|
||||||
|
'Erraneous hook implementation, class "%s" does not exist',
|
||||||
|
$class
|
||||||
|
);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$instance = new $class();
|
$instance = new $class();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user