X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FBagOStuff.php;h=7759947ee0e212471b6a29a64dd4f718f99e320d;hb=370bb99a9bb9836286af54856392ecabf09969f7;hp=50441c5e313829eacf04e97bc0eccafd45c87c19;hpb=fe6468c62cb6b64bfb825550c4c5af4b01910e96;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 50441c5e31..7759947ee0 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -590,7 +590,11 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * @return bool Success */ public function unlock( $key ) { - if ( isset( $this->locks[$key] ) && --$this->locks[$key]['depth'] <= 0 ) { + if ( !isset( $this->locks[$key] ) ) { + return false; + } + + if ( --$this->locks[$key]['depth'] <= 0 ) { unset( $this->locks[$key] ); $ok = $this->doDelete( "{$key}:lock" );