Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

http_response_code must emit a warning if headers were already flushed #10742

Closed
@mvorisek

Description

@mvorisek

Description

The following code:

<?phpecho'x';ob_end_flush();flush();// header('test: test');http_response_code(301);

Resulted in this output:

x

But I expected this output instead:

xWarning:  Cannot modify response code - headers already sent by (output started at ....php:12) in ...

I would expect about the same warning asheader() emit. In the repro above, I have verifiedheader(string) emits a warning, buthttp_response_code(number) currently does not.

PHP Version

any

Operating System

any

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp