Browse Source

Fix PHP Warning: Redis::connect() expects parameter 2 to be int, string given

pull/7075/head
Aleksander Machniak 6 years ago
parent
commit
4683204ddf
  1. 4
      program/lib/Roundcube/rcube_session_redis.php

4
program/lib/Roundcube/rcube_session_redis.php

@ -72,7 +72,7 @@ class rcube_session_redis extends rcube_session {
$port = ($port !== null) ? $port : 6379;
$database = ($database !== null) ? $database : 0;
if ($this->redis->connect($host, $port) === false) {
if ($this->redis->connect($host, (int) $port) === false) {
rcube::raise_error(
array(
'code' => 604,
@ -100,7 +100,7 @@ class rcube_session_redis extends rcube_session {
);
}
if ($database != 0 && $this->redis->select($database) === false) {
if ($database && $this->redis->select($database) === false) {
rcube::raise_error(
array(
'code' => 604,

Loading…
Cancel
Save