Cast the Redis port to int
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Sep 2021 13:13:42 +0000 (15:13 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Sep 2021 13:13:42 +0000 (15:13 +0200)
commitb523ccca4bf24f1a9a8e56f0068846d84ff91956
tree4cfd295bb4e747a43f2c131ceea28f5255ca0d26
parent29ad1fcf3418176a624a69a2cb71cd7472417fc0
Cast the Redis port to int

The `Redis::connect()` method expects the `$port` parameter to be an integer.
PHP will automatically cast numeric strings to an integer, but error out with
an TypeError if the string is not a well-formed number. This TypeError will not
be caught in an `catch(\Exception $e)` block, because TypeError does not
inherit Exception.

Perform an explicit cast to ensure the fallback to DiskCacheSource works.
wcfsetup/install/files/lib/system/database/Redis.class.php