1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

Fix type errors, thanks phan

This commit is contained in:
Jordi Boggiano
2016-09-25 22:00:12 +02:00
parent 85792c8818
commit 5ce1c921ad
16 changed files with 56 additions and 68 deletions

View File

@@ -133,6 +133,7 @@ class RavenHandler extends AbstractProcessingHandler
*/
protected function write(array $record)
{
/** @var bool|null|array This is false, unless set below to null or an array of data, when we read the current user context */
$previousUserContext = false;
$options = [];
$options['level'] = $this->logLevels[$record['level']];
@@ -186,7 +187,8 @@ class RavenHandler extends AbstractProcessingHandler
$this->ravenClient->captureMessage($record['formatted'], [], $options);
}
if ($previousUserContext !== false) {
// restore the user context if it was modified
if (!is_bool($previousUserContext)) {
$this->ravenClient->user_context($previousUserContext);
}
}