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];
|
||||
|
||||
if (! class_exists($class)) {
|
||||
throw new ProgrammingError(
|
||||
'Erraneous hook implementation, class "%s" does not exist',
|
||||
$class
|
||||
);
|
||||
}
|
||||
try {
|
||||
$instance = new $class();
|
||||
} catch (Exception $e) {
|
||||
|
|
Loading…
Reference in New Issue