diff options
author | Daniel Hunsaker <danhunsaker@gmail.com> | 2013-03-04 13:14:22 +0100 |
---|---|---|
committer | Daniel Hunsaker <danhunsaker@gmail.com> | 2013-03-04 13:14:22 +0100 |
commit | 8626e93d5b4362c86a58933dda9206ac8810476d (patch) | |
tree | fc8e24af0186afcabc7dee57b6c953774c27fbd1 /system/core/Common.php | |
parent | b2ac67a3a766ac18f5041eff7a5cbeef7437a184 (diff) |
Reverting changes to functions that have no business being used in CLI apps to begin with
Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index e11668d5f..9baf5e315 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -531,16 +531,13 @@ if ( ! function_exists('set_status_header')) $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; - if ( ! headers_sent()) + if (strpos(php_sapi_name(), 'cgi') === 0) { - if (strpos(php_sapi_name(), 'cgi') === 0) - { - header('Status: '.$code.' '.$text, TRUE); - } - else - { - header(($server_protocol ? $server_protocol : 'HTTP/1.1').' '.$code.' '.$text, TRUE, $code); - } + header('Status: '.$code.' '.$text, TRUE); + } + else + { + header(($server_protocol ? $server_protocol : 'HTTP/1.1').' '.$code.' '.$text, TRUE, $code); } } } |