`ConfigFormEventsHook`: Use `self` to access static property `$lastErrors`

This commit is contained in:
raviks789 2023-08-15 10:09:09 +02:00
parent 2265b9d27b
commit dd8875f99f
1 changed files with 3 additions and 3 deletions

View File

@ -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));