A small optimization in CI_Cache::is_supported()
As it was, the static variable was always re-set to an empty array
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php
index 215a7c5..06403b6 100644
--- a/system/libraries/Cache/Cache.php
+++ b/system/libraries/Cache/Cache.php
@@ -243,14 +243,13 @@
*/
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];
}
-
}