MDL-35198 cache: Fixed up key_exists call in cache
authorSam Hemelryk <sam@moodle.com>
Tue, 16 Oct 2012 03:25:02 +0000 (11:25 +0800)
committerSam Hemelryk <sam@moodle.com>
Tue, 16 Oct 2012 03:25:02 +0000 (11:25 +0800)
cache/locks/file/lib.php

index b726cb7..6094c53 100644 (file)
@@ -203,7 +203,7 @@ class cachelock_file implements cache_lock_interface {
      * @param string $ownerid
      */
     public function check_state($key, $ownerid) {
-        if (key_exists($key, $this->locks)) {
+        if (array_key_exists($key, $this->locks)) {
             // The key is locked and we own it.
             return true;
         }
@@ -234,4 +234,4 @@ class cachelock_file implements cache_lock_interface {
             @unlink($lockfile);
         }
     }
-}
\ No newline at end of file
+}