Skip to content

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