Thanks to visit codestin.com
Credit goes to github.com

Skip to content

http-foundation 7.3.0 & var-dumper 7.3.0 : ErrorException: Cannot modify header information - headers already sent byΒ #60717

Closed as duplicate of#60603
@Ronan-Lenor

Description

@Ronan-Lenor

Symfony version(s) affected

7.3

Description

When i use dump(1); in Laravel (which rely on the symfony packages) before rendering a view i get a :
ErrorException: Cannot modify header information - headers already sent by...

Route::get('/test', function () {
    dump(1);
    return 'ok';
});

How to reproduce

use dump(1); before render a view

Possible Solution

does var-dumper should consider using ob_start(); ... ob_end_clean(); somewhere ? πŸ™„
i dunno. but maybe some modification of it would be welcome to handle that situation.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions