Don't use error suppression on ini_get() either
diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php
index d062103..de849c7 100644
--- a/system/libraries/Cache/drivers/Cache_apc.php
+++ b/system/libraries/Cache/drivers/Cache_apc.php
@@ -187,7 +187,7 @@
*/
public function is_supported()
{
- if ( ! extension_loaded('apc') OR ! (bool) @ini_get('apc.enabled'))
+ if ( ! extension_loaded('apc') OR ! ini_get('apc.enabled'))
{
log_message('debug', 'The APC PHP extension must be loaded to use APC Cache.');
return FALSE;
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 93c19de..3c3c49e 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -401,7 +401,7 @@
$this->_smtp_auth = ! ($this->smtp_user === '' && $this->smtp_pass === '');
}
- $this->_safe_mode = ( ! is_php('5.4') && (bool) @ini_get('safe_mode'));
+ $this->_safe_mode = ( ! is_php('5.4') && ini_get('safe_mode'));
$this->charset = strtoupper($this->charset);
log_message('debug', 'Email Class Initialized');
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 983d832..4939b15 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1255,7 +1255,7 @@
}
}
- if ((bool) @ini_get('safe_mode') === FALSE && function_usable('shell_exec'))
+ if ( ! ini_get('safe_mode') && function_usable('shell_exec'))
{
$mime = @shell_exec($cmd);
if (strlen($mime) > 0)