mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-24 06:52:34 +01:00
Added missing check for array key in GelfMessageFormatter
This commit is contained in:
parent
3d2567a2f1
commit
9c78c9764a
@ -89,7 +89,7 @@ class GelfMessageFormatter extends NormalizerFormatter
|
||||
$message->setAdditional($this->contextPrefix . $key, is_scalar($val) ? $val : $this->toJson($val));
|
||||
}
|
||||
|
||||
if (null === $message->getFile() && isset($record['context']['exception'])) {
|
||||
if (null === $message->getFile() && isset($record['context']['exception']['file'])) {
|
||||
if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) {
|
||||
$message->setFile($matches[1]);
|
||||
$message->setLine($matches[2]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user