Merge pull request #3558 from Icinga/fix/permission-test-in-hook-has

Fix permission test in Hook::has()
This commit is contained in:
Eric Lippmann 2018-11-15 11:26:07 +01:00 committed by GitHub
commit 0c06ec7431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,11 +75,13 @@ class Hook
return false; return false;
} }
$hook = self::$hooks[$name]; foreach (self::$hooks[$name] as $hook) {
// $hook is in the format key => value if (self::hasPermission($hook)) {
$hook = reset($hook); return true;
}
}
return self::hasPermission($hook); return false;
} }
protected static function normalizeHookName($name) protected static function normalizeHookName($name)