1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00

Merge pull request #1355 from ScullWM/error_handler_signature

Fix error_handler return type declaration
This commit is contained in:
Jordi Boggiano
2019-08-15 21:25:15 +02:00
committed by GitHub
4 changed files with 11 additions and 1 deletions

View File

@@ -200,6 +200,8 @@ class ErrorHandler
} elseif ($this->previousErrorHandler) {
return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context);
}
return true;
}
/**

View File

@@ -134,9 +134,11 @@ class StreamHandler extends AbstractProcessingHandler
fwrite($stream, (string) $record['formatted']);
}
private function customErrorHandler($code, $msg): void
private function customErrorHandler($code, $msg): bool
{
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
return true;
}
private function getDirFromStream(string $stream): ?string