From 2fae1c38da556e7caf265909d2ada4d2e43c4363 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 22 Oct 2016 09:12:57 +0200 Subject: [PATCH] Fix IDE warnings/notices in `UserStorageHandler` --- .../system/user/storage/UserStorageHandler.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php index df44919e39..cd4980c604 100644 --- a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php @@ -2,6 +2,7 @@ namespace wcf\system\user\storage; use wcf\system\cache\source\RedisCacheSource; use wcf\system\cache\CacheHandler; +use wcf\system\database\Redis; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\SingletonFactory; use wcf\system\WCF; @@ -35,16 +36,17 @@ class UserStorageHandler extends SingletonFactory { /** * redis instance - * @var Redis + * @var Redis */ - protected $redis = null; + protected $redis; /** * Checks whether Redis is available. */ protected function init() { - if (CacheHandler::getInstance()->getCacheSource() instanceof RedisCacheSource) { - $this->redis = CacheHandler::getInstance()->getCacheSource()->getRedis(); + $cacheSource = CacheHandler::getInstance()->getCacheSource(); + if ($cacheSource instanceof RedisCacheSource) { + $this->redis = $cacheSource->getRedis(); } } -- 2.20.1