mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 18:16:10 +02:00
Fix constructor handling of arrays
This commit is contained in:
@@ -31,7 +31,13 @@ class Logger
|
||||
|
||||
public function __construct($logs = array())
|
||||
{
|
||||
$this->logs = (array) $logs;
|
||||
$this->logs = array();
|
||||
if (!is_array($logs)) {
|
||||
$logs = array($logs);
|
||||
}
|
||||
foreach ($logs as $log) {
|
||||
$this->logs[$log->getName()] = $log;
|
||||
}
|
||||
}
|
||||
|
||||
public function addLog(Log $log)
|
||||
|
||||
Reference in New Issue
Block a user