mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
parent
dc3c787446
commit
a24bf32c5b
@ -155,6 +155,20 @@ class Hook
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$instance instanceof $base_class) {
|
if (!$instance instanceof $base_class) {
|
||||||
|
|
||||||
|
// This is a compatibility check. Should be removed one far day:
|
||||||
|
if ($module !== null) {
|
||||||
|
$compat_class = 'Icinga\\Module\\'
|
||||||
|
. ucfirst($module)
|
||||||
|
. '\\Web\\Hook\\'
|
||||||
|
. ucfirst($name)
|
||||||
|
. $suffix;
|
||||||
|
|
||||||
|
if ($instance instanceof $compat_class) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new ProgrammingError(
|
throw new ProgrammingError(
|
||||||
'%s is not an instance of %s',
|
'%s is not an instance of %s',
|
||||||
get_class($instance),
|
get_class($instance),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user