mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Make sure all exception codes are integers, fixes #1393
This commit is contained in:
@@ -186,7 +186,7 @@ class JsonFormatter extends NormalizerFormatter
|
|||||||
$data = array(
|
$data = array(
|
||||||
'class' => Utils::getClass($e),
|
'class' => Utils::getClass($e),
|
||||||
'message' => $e->getMessage(),
|
'message' => $e->getMessage(),
|
||||||
'code' => $e->getCode(),
|
'code' => (int) $e->getCode(),
|
||||||
'file' => $e->getFile().':'.$e->getLine(),
|
'file' => $e->getFile().':'.$e->getLine(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -87,7 +87,7 @@ class MongoDBFormatter implements FormatterInterface
|
|||||||
$formattedException = array(
|
$formattedException = array(
|
||||||
'class' => Utils::getClass($exception),
|
'class' => Utils::getClass($exception),
|
||||||
'message' => $exception->getMessage(),
|
'message' => $exception->getMessage(),
|
||||||
'code' => $exception->getCode(),
|
'code' => (int) $exception->getCode(),
|
||||||
'file' => $exception->getFile() . ':' . $exception->getLine(),
|
'file' => $exception->getFile() . ':' . $exception->getLine(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -129,7 +129,7 @@ class NormalizerFormatter implements FormatterInterface
|
|||||||
$data = array(
|
$data = array(
|
||||||
'class' => Utils::getClass($e),
|
'class' => Utils::getClass($e),
|
||||||
'message' => $e->getMessage(),
|
'message' => $e->getMessage(),
|
||||||
'code' => $e->getCode(),
|
'code' => (int) $e->getCode(),
|
||||||
'file' => $e->getFile().':'.$e->getLine(),
|
'file' => $e->getFile().':'.$e->getLine(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user