mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-18 23:26:20 +02:00
Move to strict mode and fix tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
@@ -83,7 +83,7 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
|
||||
}
|
||||
|
||||
// convert textual description of facility to syslog constant
|
||||
if (array_key_exists(strtolower($facility), $this->facilities)) {
|
||||
if (is_string($facility) && array_key_exists(strtolower($facility), $this->facilities)) {
|
||||
$facility = $this->facilities[strtolower($facility)];
|
||||
} elseif (!in_array($facility, array_values($this->facilities), true)) {
|
||||
throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given');
|
||||
|
Reference in New Issue
Block a user