Skip to content
Snippets Groups Projects
Unverified Commit 610edb25 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Fix bug in createLoggingHandler

Fixes edge-case https://github.com/simplesamlphp/simplesamlphp/issues/741 where application has one of the known LoggingHandlers' name as a defined class
parent 6bb7a1da
No related branches found
No related tags found
No related merge requests found
......@@ -373,7 +373,7 @@ class Logger
$handler = $config->getString('logging.handler', 'syslog');
}
if (class_exists($handler)) {
if (!array_key_exists($handler, $known_handlers) && class_exists($handler)) {
if (!in_array('SimpleSAML\Logger\LoggingHandlerInterface', class_implements($handler), true)) {
throw new \Exception("The logging handler '$handler' is invalid.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment