From d4797177b524050fbfab3dfc36d063157cc5890d Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 15 Oct 2012 11:24:19 +0800 Subject: [PATCH 1/2] MDL-36047 cache: Fixed up issues with PHP 5.3.2 and 5.3.7 --- cache/classes/config.php | 2 +- cache/classes/loaders.php | 2 +- cache/locallib.php | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cache/classes/config.php b/cache/classes/config.php index 0917a83b268..682ef181491 100644 --- a/cache/classes/config.php +++ b/cache/classes/config.php @@ -170,7 +170,7 @@ class cache_config { $plugin = $store['plugin']; $class = 'cachestore_'.$plugin; $exists = array_key_exists($plugin, $availableplugins); - if (!$exists && (!class_exists($class) || !is_subclass_of($class, 'cache_store'))) { + if (!$exists) { // Not a valid plugin, or has been uninstalled, just skip it an carry on. debugging('Invalid cache store in config. Not an available plugin.', DEBUG_DEVELOPER); continue; diff --git a/cache/classes/loaders.php b/cache/classes/loaders.php index 85958088526..aa6a0ed0b50 100644 --- a/cache/classes/loaders.php +++ b/cache/classes/loaders.php @@ -40,7 +40,7 @@ defined('MOODLE_INTERNAL') || die(); * @copyright 2012 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class cache implements cache_loader, cache_is_key_aware { +class cache implements cache_loader { /** * We need a timestamp to use within the cache API. diff --git a/cache/locallib.php b/cache/locallib.php index 2bc3797958f..08a3ca9da1a 100644 --- a/cache/locallib.php +++ b/cache/locallib.php @@ -136,7 +136,8 @@ class cache_config_writer extends cache_config { throw new cache_exception('Invalid cache plugin specified. The plugin does not contain the required class.'); } } - if (!is_subclass_of($class, 'cache_store')) { + $reflection = new ReflectionClass($class); + if (!$reflection->implementsInterface('cache_store')) { throw new cache_exception('Invalid cache plugin specified. The plugin does not extend the required class.'); } if (!$class::are_requirements_met()) { @@ -400,7 +401,7 @@ class cache_config_writer extends cache_config { $definition['component'] = $component; $definition['area'] = $area; if (array_key_exists($id, $definitions)) { - debugging('Error: duplicate cache definition found with name '.$name, DEBUG_DEVELOPER); + debugging('Error: duplicate cache definition found with id: '.$id, DEBUG_DEVELOPER); continue; } $definitions[$id] = $definition; From ecfe814e0f407778abec81afc2e3d99e930bfba9 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 15 Oct 2012 13:24:09 +0800 Subject: [PATCH 2/2] on-demand release 2.4dev --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index a684ead992a..abad159526f 100644 --- a/version.php +++ b/version.php @@ -30,11 +30,11 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012101400.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2012101500.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes -$release = '2.4dev (Build: 20121014)'; // Human-friendly version name +$release = '2.4dev (Build: 20121015)'; // Human-friendly version name $branch = '24'; // this version's branch $maturity = MATURITY_ALPHA; // this version's maturity level