Logger not forwarded to own ErrorHandlingMiddleware
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12.3k
- Forks
- 2k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
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.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Slim/Middleware/ErrorMiddleware.php at the linked line and compare the handler arguments with the error-handling documentation example. Reproduce the documented customErrorHandler case and confirm that the handler receives the ErrorMiddleware logger instead of null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100