MDL-57572 redis: Prevent installation to fail on sites without redis

This commit is contained in:
Eloy Lafuente (stronk7) 2017-01-11 02:22:48 +01:00
parent 7bdbad80d8
commit e238dcc8b2

View File

@ -35,6 +35,8 @@ $settings->add(
)
);
if (class_exists('Redis')) { // Only if Redis is available.
$options = array(Redis::SERIALIZER_PHP => get_string('serializer_php', 'cachestore_redis'));
if (defined('Redis::SERIALIZER_IGBINARY')) {
@ -49,3 +51,4 @@ $settings->add(new admin_setting_configselect(
$options
)
);
}