Skip to content
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

Make sure we close all output-buffer we started beforehand #632

Merged
merged 5 commits into from
Jul 4, 2019

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jun 24, 2019

No description provided.

@staabm
Copy link
Contributor Author

staabm commented Jun 24, 2019

hmm not sure I understand what the builds errors try to tell me.

Copy link
Contributor

@Magentron Magentron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is as I have tested it.

@staabm staabm changed the title Make sure we close all output-buffer we started beforehand WIP: Make sure we close all output-buffer we started beforehand Jun 24, 2019
@staabm
Copy link
Contributor Author

staabm commented Jun 24, 2019

since the build errors are still there, I dont think this is the right fix for the issue at least.

maybe it fixes your problem, but at least not the one reported by travis ;-)

@Magentron
Copy link
Contributor

I'll try to have a better look at it later.

@staabm
Copy link
Contributor Author

staabm commented Jun 25, 2019

Hhmm I guess the source of the travis build warnings is here:

whoops/src/Whoops/Run.php

Lines 345 to 347 in 3ab01b9

while ($this->system->getOutputBufferLevel() > 0) {
$this->system->endOutputBuffering();
}

@Magentron
Copy link
Contributor

FWIW, work-around for a test:

  • before doing something:
        $level = ob_get_level();
  • at the end of the test:
        while (ob_get_level() > $level) {
            $content = ob_get_clean();
        }

Magentron and others added 2 commits June 26, 2019 07:45
@Magentron
Copy link
Contributor

Who should I contact to get this PR merged?

@staabm staabm changed the title WIP: Make sure we close all output-buffer we started beforehand Make sure we close all output-buffer we started beforehand Jul 1, 2019
@denis-sokolov
Copy link
Collaborator

Me! Thanks for the notice, I’ll take a look at it eventually.


try {
// Just in case there are no handlers:
$handlerResponse = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assignments could be moved before the try/catch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are so right, my bad, preparing to update PR

@denis-sokolov denis-sokolov merged commit f3108df into filp:master Jul 4, 2019
@staabm staabm deleted the patch-3 branch July 4, 2019 13:38
@denis-sokolov
Copy link
Collaborator

Thanks! 2.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants