mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 21:26:43 +02:00
Merge pull request #473 from tPl0ch/hotfix-gelf-formatter
Added missing check for array key in `GelfMessageFormatter`
This commit is contained in:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user