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

[4.4] Fix output buffering #7500

Merged
merged 4 commits into from
May 23, 2023
Merged

Conversation

iRedds
Copy link
Collaborator

@iRedds iRedds commented May 15, 2023

Description
Fixes #7493

Work with output buffering was carried out incorrectly.

To bypass an existing bug in tests, a hack was used

if (ob_get_level() > 1) {
ob_end_clean();
}

In my opinion, this PR correctly completes output buffering, including for exceptions.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@iRedds iRedds closed this May 15, 2023
@iRedds iRedds deleted the fix-output-buffering branch May 15, 2023 07:27
@iRedds iRedds restored the fix-output-buffering branch May 15, 2023 07:28
@iRedds iRedds reopened this May 15, 2023
@iRedds iRedds changed the base branch from develop to 4.4 May 15, 2023 07:30
@iRedds
Copy link
Collaborator Author

iRedds commented May 15, 2023

Error installing Imagic. Tests are not available.

@kenjis kenjis added 4.4 bug Verified issues on the current code behavior or pull requests that will fix them labels May 15, 2023
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

That is a really good find and improvement. Thanks!

I have tested it a bit and see no issues.

@michalsn michalsn linked an issue May 17, 2023 that may be closed by this pull request
@kenjis kenjis merged commit 2f576d3 into codeigniter4:4.4 May 23, 2023
@kenjis
Copy link
Member

kenjis commented May 23, 2023

@iRedds Thank you. This made CodeIgniter.php code cleaner.

@kenjis kenjis mentioned this pull request May 24, 2023
@iRedds iRedds deleted the fix-output-buffering branch May 24, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.4 bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: output buffer
3 participants