From: Matthias Schmidt Date: Sat, 22 Oct 2016 07:12:57 +0000 (+0200) Subject: Fix IDE warnings/notices in `UserStorageHandler` X-Git-Tag: 3.0.0_Beta_4~41 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fae1c38da556e7caf265909d2ada4d2e43c4363;p=GitHub%2FWoltLab%2FWCF.git Fix IDE warnings/notices in `UserStorageHandler` --- 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(); } }