X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fcache%2FMapCacheLRU.php;h=95e3af769ec4ee2130d6217dec18189ff09db130;hb=e1c9a04624d941ca39de282e5a7c5fa35de2fe09;hp=a22d8023d64ca09cad42ab504e04b72ed1bd6ab2;hpb=e40b19ed4e2b3a367f26bdd2d6187d8134e3cb01;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/MapCacheLRU.php b/includes/cache/MapCacheLRU.php index a22d8023d6..95e3af769e 100644 --- a/includes/cache/MapCacheLRU.php +++ b/includes/cache/MapCacheLRU.php @@ -57,7 +57,7 @@ class MapCacheLRU { * @return void */ public function set( $key, $value ) { - if ( isset( $this->cache[$key] ) ) { + if ( array_key_exists( $key, $this->cache ) ) { $this->ping( $key ); // push to top } elseif ( count( $this->cache ) >= $this->maxCacheKeys ) { reset( $this->cache ); @@ -74,7 +74,7 @@ class MapCacheLRU { * @return bool */ public function has( $key ) { - return isset( $this->cache[$key] ); + return array_key_exists( $key, $this->cache ); } /** @@ -86,7 +86,7 @@ class MapCacheLRU { * @return mixed */ public function get( $key ) { - if ( isset( $this->cache[$key] ) ) { + if ( array_key_exists( $key, $this->cache ) ) { $this->ping( $key ); // push to top return $this->cache[$key]; } else {