WordPress.org

Make WordPress Core

Changeset 4724


Ignore:
Timestamp:
01/12/2007 09:41:48 PM (11 years ago)
Author:
markjaquith
Message:

Use http_response_code for in status_header() on PHP >= 4.3.0 per Ryan's suggestion. relates to #3528

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/functions.php

    r4709 r4724  
    22292229        $text = 'Gone';
    22302230
    2231     @header("HTTP/1.1 $header $text");
     2231    if ( version_compare(php_version(), '4.3.0', '>=') )
     2232        @header("HTTP/1.1 $header $text", true, $header);
     2233    else
     2234        @header("HTTP/1.1 $header $text");
    22322235}
    22332236
  • trunk/wp-includes/functions.php

    r4684 r4724  
    817817        $text = 'Gone';
    818818
    819 //  if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
     819    if ( version_compare(php_version(), '4.3.0', '>=') )
     820        @header("HTTP/1.1 $header $text", true, $header);
     821    else
    820822        @header("HTTP/1.1 $header $text");
    821 //  else
    822 //      @header("Status: $header $text");
    823823}
    824824
Note: See TracChangeset for help on using the changeset viewer.