As written in documentaton the customErrorHandler should receive the logger of the ErrorMiddleware as 6th parameter.
But unfortunately the customErrorHandler always receives null. This can be reproduced by just copying the code from the documentation.
Did some research and it seems the logger is not correctly submitted to the handler in the line below.
|
return $handler($request, $exception, $this->displayErrorDetails, $this->logErrors, $this->logErrorDetails); |
I've added $this->logger locally on my server and now my customErrorHandler gets the logger as intended.
I'm not aware of side effects this could have so created an issue here and no pull request.
Best.
As written in documentaton the
customErrorHandlershould receive the logger of theErrorMiddlewareas 6th parameter.But unfortunately the
customErrorHandleralways receivesnull. This can be reproduced by just copying the code from the documentation.Did some research and it seems the logger is not correctly submitted to the handler in the line below.
Slim/Slim/Middleware/ErrorMiddleware.php
Line 127 in 5613cbb
I've added
$this->loggerlocally on my server and now mycustomErrorHandlergets the logger as intended.I'm not aware of side effects this could have so created an issue here and no pull request.
Best.