MDL-43349 cache: init now checks store requirements are met

This commit is contained in:
Sam Hemelryk
2014-01-02 09:22:34 +13:00
parent e92da00284
commit 22cb8ba92c
2 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -468,8 +468,9 @@ class cache_helper {
$class = $store['class'];
// Found the store: is it ready?
/* @var cache_store $instance */
$instance = new $class($store['name'], $store['configuration']);
if (!$instance->is_ready()) {
if (!$instance::are_requirements_met() || !$instance->is_ready()) {
unset($instance);
return false;
}