From de879172d7428eb8a2ec5eb1bc805f6bbcd6eb5a Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 12 Jan 2007 21:41:48 +0000 Subject: [PATCH] Use http_response_code for in status_header() on PHP >= 4.3.0 per Ryan's suggestion. relates to #3528 git-svn-id: http://svn.automattic.com/wordpress/trunk@4724 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d06be2f3f6..2b73a180d0 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -816,10 +816,10 @@ function status_header( $header ) { elseif ( 410 == $header ) $text = 'Gone'; -// if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) + if ( version_compare(php_version(), '4.3.0', '>=') ) + @header("HTTP/1.1 $header $text", true, $header); + else @header("HTTP/1.1 $header $text"); -// else -// @header("Status: $header $text"); } function nocache_headers() {