mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
ConfigFormEventsHook
: Use self
to access static property $lastErrors
This commit is contained in:
parent
2265b9d27b
commit
dd8875f99f
@ -63,7 +63,7 @@ abstract class ConfigFormEventsHook
|
||||
*/
|
||||
final public static function getLastErrors()
|
||||
{
|
||||
return static::$lastErrors;
|
||||
return self::$lastErrors;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,7 +92,7 @@ abstract class ConfigFormEventsHook
|
||||
|
||||
private static function runEventMethod($eventMethod, Form $form)
|
||||
{
|
||||
static::$lastErrors = [];
|
||||
self::$lastErrors = [];
|
||||
|
||||
if (! Hook::has('ConfigFormEvents')) {
|
||||
return true;
|
||||
@ -109,7 +109,7 @@ abstract class ConfigFormEventsHook
|
||||
try {
|
||||
$hook->$eventMethod($form);
|
||||
} catch (\Exception $e) {
|
||||
static::$lastErrors[] = $e->getMessage();
|
||||
self::$lastErrors[] = $e->getMessage();
|
||||
|
||||
Logger::error("%s\n%s", $e, IcingaException::getConfidentialTraceAsString($e));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user