Skip to content

[12.x] Only call the ob_flush function if there is active buffer in eventStream #55141

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

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

tonysm
Copy link
Contributor

@tonysm tonysm commented Mar 23, 2025

Fixed

  • Check the buffer level before flushing it to avoid the "no active buffer" error

Context:

When ob_flush() is called without first calling ob_start(), it fails saying there's no active buffer. We need to check the buffer level before flushing it to avoid this issue. This is also how Livewire does it.

When ob_flush() is called without first calling ob_start(), it fails
saying there's no active buffer.

To avoid this issue, we must check the buffer level before flushing it.
@tonysm tonysm changed the title [12.x] Only call the ob_flush function if there is active buffer [12.x] Only call the ob_flush function if there is active buffer in eventStream Mar 23, 2025
@taylorotwell taylorotwell merged commit 873cdba into laravel:12.x Mar 24, 2025
41 checks passed
@tonysm tonysm deleted the tm/fix-event-streams-ob-flush branch March 24, 2025 15:59
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.

2 participants