mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +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()
|
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)
|
private static function runEventMethod($eventMethod, Form $form)
|
||||||
{
|
{
|
||||||
static::$lastErrors = [];
|
self::$lastErrors = [];
|
||||||
|
|
||||||
if (! Hook::has('ConfigFormEvents')) {
|
if (! Hook::has('ConfigFormEvents')) {
|
||||||
return true;
|
return true;
|
||||||
@ -109,7 +109,7 @@ abstract class ConfigFormEventsHook
|
|||||||
try {
|
try {
|
||||||
$hook->$eventMethod($form);
|
$hook->$eventMethod($form);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
static::$lastErrors[] = $e->getMessage();
|
self::$lastErrors[] = $e->getMessage();
|
||||||
|
|
||||||
Logger::error("%s\n%s", $e, IcingaException::getConfidentialTraceAsString($e));
|
Logger::error("%s\n%s", $e, IcingaException::getConfidentialTraceAsString($e));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user