New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handlers should respect outputBuffering
setting
#2208
Comments
Thinning about it, this is probably solvable with middleware. |
@akrabat Is this going to be "solved with middleware"? I'm looking at issues tagged with 'help wanted' so I can possibly pitch in. I obviously don't want to work on something that doesn't need fixing... |
@geggleto I'll see if I can come up with a working PR in the next few days. |
I have a problem with this implementation... IMO it's not the error handler responsability to handle the output buffer started by the Router. It should not even know about the outputBuffering setting. |
Given this code,
I should see the var_dump'd information displayed if
outputBufferring
is set toappend
orprepend
.This requires changes to:
Route::__invoke()
to remove theob_end_clean()
calls.outputBuffering
setting intoSlim\Handlers\AbstracError
's constructor and store as a protected propertySlim\Hanlders\Error
to useob_get_clean()
and add it to the response in the correct place as per theoutputBuffering
setting.The text was updated successfully, but these errors were encountered: