From: Umherirrender Date: Thu, 5 Sep 2019 19:45:15 +0000 (+0200) Subject: Throw if Redis::SERIALIZER_IGBINARY is not defined X-Git-Tag: 1.34.0-rc.0~270^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=baf063c7d59b969af5f583278b754f2abd1577b8;p=lhc%2Fweb%2Fwiklou.git Throw if Redis::SERIALIZER_IGBINARY is not defined This makes it easier to find issues when redis was not compiled with igbinary support. Change-Id: Ic60a4c1c141f21a60cc6f4c773bd35e93290c2cd --- diff --git a/includes/libs/redis/RedisConnectionPool.php b/includes/libs/redis/RedisConnectionPool.php index eb645cc149..343e35c41b 100644 --- a/includes/libs/redis/RedisConnectionPool.php +++ b/includes/libs/redis/RedisConnectionPool.php @@ -90,6 +90,10 @@ class RedisConnectionPool implements LoggerAwareInterface { if ( !isset( $options['serializer'] ) || $options['serializer'] === 'php' ) { $this->serializer = Redis::SERIALIZER_PHP; } elseif ( $options['serializer'] === 'igbinary' ) { + if ( !defined( 'Redis::SERIALIZER_IGBINARY' ) ) { + throw new InvalidArgumentException( + __CLASS__ . ': configured serializer "igbinary" not available' ); + } $this->serializer = Redis::SERIALIZER_IGBINARY; } elseif ( $options['serializer'] === 'none' ) { $this->serializer = Redis::SERIALIZER_NONE;