diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-26 17:51:18 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-26 17:51:18 +0100 |
commit | 58e1c00275ecbe40c1fb27271650e75f80f0cf1d (patch) | |
tree | 3c5a7cb2870d38ed1a2c1d1b2798543fd94cb2c9 /system | |
parent | 382b51383c84fbb7f861fcd87b0b71b35c9f2869 (diff) |
More removal of error suppression usage
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_driver.php | 11 | ||||
-rw-r--r-- | system/database/DB_utility.php | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 7551e4896..ad9e31fc4 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1577,16 +1577,13 @@ abstract class CI_DB_driver { */ protected function _cache_init() { - if (class_exists('CI_DB_Cache', FALSE)) + if ( ! class_exists('CI_DB_Cache', FALSE)) { - if (is_object($this->CACHE)) - { - return TRUE; - } + require_once(BASEPATH.'database/DB_cache.php'); } - elseif ( ! @include_once(BASEPATH.'database/DB_cache.php')) + elseif (is_object($this->CACHE)) { - return $this->cache_off(); + return TRUE; } $this->CACHE = new CI_DB_Cache($this); // pass db object to support multiple db connections and returned db objects diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 11c5e116b..a6961120e 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -356,8 +356,8 @@ abstract class CI_DB_utility { // Is the encoder supported? If not, we'll either issue an // error or use plain text depending on the debug settings - if (($prefs['format'] === 'gzip' && ! @function_exists('gzencode')) - OR ($prefs['format'] === 'zip' && ! @function_exists('gzcompress'))) + if (($prefs['format'] === 'gzip' && ! function_exists('gzencode')) + OR ($prefs['format'] === 'zip' && ! function_exists('gzcompress'))) { if ($this->db->db_debug) { |