From f5c263836db4b9ff14afa5fb110420b5da2f5218 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Tue, 3 Sep 2013 13:36:08 +0800 Subject: [PATCH] MDL-41558 cache: Identifiers should never be passed as null to cache::make() --- cache/classes/definition.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/classes/definition.php b/cache/classes/definition.php index 1b19fb2f2ed..da5cd4cc209 100644 --- a/cache/classes/definition.php +++ b/cache/classes/definition.php @@ -756,7 +756,7 @@ class cache_definition { */ public function set_identifiers(array $identifiers = array()) { foreach ($this->requireidentifiers as $identifier) { - if (!array_key_exists($identifier, $identifiers)) { + if (!isset($identifiers[$identifier])) { throw new coding_exception('Identifier required for cache has not been provided: '.$identifier); } }