dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Chunked upload result should consistently have a "stage" value for "Poll""
[lhc/web/wiklou.git]
/
includes
/
cache
/
MapCacheLRU.php
diff --git
a/includes/cache/MapCacheLRU.php
b/includes/cache/MapCacheLRU.php
index
a22d802
..
95e3af7
100644
(file)
--- a/
includes/cache/MapCacheLRU.php
+++ b/
includes/cache/MapCacheLRU.php
@@
-57,7
+57,7
@@
class MapCacheLRU {
* @return void
*/
public function set( $key, $value ) {
* @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 );
$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 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 ) {
* @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 {
$this->ping( $key ); // push to top
return $this->cache[$key];
} else {