summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2015-02-04 18:20:01 +0100
committerAhmad Anbar <aanbar@gmail.com>2015-02-04 18:20:01 +0100
commite5454f9b28f123a5549971f580255a065b2f8cc2 (patch)
treec4927e7b7afb0bf242976034630cc60f2f1db00f /system/core/Common.php
parent6db62ab0ad0e223806a1367e12b1884b48dc65d7 (diff)
parenteccac6e6a73a4d1a5b40f383ce64359c2c94ae12 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php14
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