diff options
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index b5a36636e..c3198b31f 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -54,7 +54,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if ( ! function_exists('is_php')) { /** - * Determines if the current version of PHP is greater then the supplied value + * Determines if the current version of PHP is equal to or greater than the supplied value * * @param string * @return bool TRUE if the current version is $version or higher @@ -555,15 +555,14 @@ if ( ! function_exists('set_status_header')) } } - $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; - if (strpos(PHP_SAPI, 'cgi') === 0) { header('Status: '.$code.' '.$text, TRUE); } else { - header(($server_protocol ? $server_protocol : 'HTTP/1.1').' '.$code.' '.$text, TRUE, $code); + $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1'; + header($server_protocol.' '.$code.' '.$text, TRUE, $code); } } } @@ -615,7 +614,7 @@ if ( ! function_exists('_error_handler')) $_error->log_exception($severity, $message, $filepath, $line); // Should we display the error? - if (ini_get('display_errors')) + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_php_error($severity, $message, $filepath, $line); } @@ -650,7 +649,7 @@ if ( ! function_exists('_exception_handler')) $_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine()); // Should we display the error? - if (ini_get('display_errors')) + if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors'))) { $_error->show_exception($exception); } @@ -842,6 +841,3 @@ if ( ! function_exists('function_usable')) return FALSE; } } - -/* End of file Common.php */ -/* Location: ./system/core/Common.php */
\ No newline at end of file |