Skip to content

ResponseEmitter::emit() breaking Gravity Forms "Page" confirmations #72

@brittanycresswell

Description

@brittanycresswell

After upgrading to v8.2, form submissions using Gravity Forms "Page" confirmation type result in a 500 error due to an EmitterException.
ResponseEmitter::emit() correctly guards against headers_sent() but doesn't guard against the case where the output buffer has content but headers haven't been sent yet. SapiEmitter::assertNoPreviousOutput() throws in this scenario because ob_get_level() > 0 && ob_get_length() > 0.

Environment: Lumberjack v8.2, Gravity Forms, WordPress 6.9.4

Here is the error from my php logs:
PHP Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException:
Output has been emitted previously; cannot emit response in
/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions