diff --git a/module/VuFind/src/VuFind/Session/Redis.php b/module/VuFind/src/VuFind/Session/Redis.php
index 3a1f36f37efb6a9751aed4e913abc799b69c7396..9e4dac5ca28b81ffe6531c00ec5bbc701c0a514e 100644
--- a/module/VuFind/src/VuFind/Session/Redis.php
+++ b/module/VuFind/src/VuFind/Session/Redis.php
@@ -72,8 +72,8 @@ class Redis extends AbstractBase
             $timeout = $this->config->redis_connection_timeout ?? 0.5;
             $auth = $this->config->redis_auth ?? false;
             $redis_db = $this->config->redis_db ?? 0;
-            $this->redisVersion = int($this->config->redis_version ?? 3);
-            $standalone = bool($this->config->redis_standalone ?? true);
+            $this->redisVersion = (int)($this->config->redis_version ?? 3);
+            $standalone = (bool)($this->config->redis_standalone ?? true);
 
             // Create Credis client, the connection is established lazily
             $this->connection = new \Credis_Client(