diff options
author | Andrey Andreev <narf@devilix.net> | 2015-06-22 12:24:11 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-06-22 12:24:11 +0200 |
commit | 070ce056047f7624ceb95a1da2a34fc96bfa0868 (patch) | |
tree | 0f100de11d195b299afd3bf4835dc2402a1dcbf6 /system/libraries/Cache/Cache.php | |
parent | 9aade1cd9f666ac0f70c97c4299063fafe68ada8 (diff) |
A small optimization in CI_Cache::is_supported()
As it was, the static variable was always re-set to an empty array
Diffstat (limited to 'system/libraries/Cache/Cache.php')
-rw-r--r-- | system/libraries/Cache/Cache.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php index 215a7c528..06403b6e9 100644 --- a/system/libraries/Cache/Cache.php +++ b/system/libraries/Cache/Cache.php @@ -243,14 +243,13 @@ class CI_Cache extends CI_Driver_Library { */ public function is_supported($driver) { - static $support = array(); + static $support; - if ( ! isset($support[$driver])) + if ( ! isset($support, $support[$driver])) { $support[$driver] = $this->{$driver}->is_supported(); } return $support[$driver]; } - } |