Undefined array key “timeout”
-
W3TC version 2.2.3 throws warnings.
Warning: Undefined array key "timeout" in ....plugins/w3-total-cache/Cache_Redis.php on line 99 Warning: Undefined array key "retry_interval" in ...plugins/w3-total-cache/Cache_Redis.php on line 100 Warning: Undefined array key "read_timeout" in ...plugins/w3-total-cache/Cache_Redis.php on line 101
How to reproduce:
Use redis to cache the W3TC config.
Set W3TC_CONFIG_CACHE_ENGINE to redis.Root cause:
Cache_Redis.php 99-101:$this->_timeout = $config['timeout']; $this->_retry_interval = $config['retry_interval']; $this->_read_timeout = $config['read_timeout'];
The config that is returned in ConfigCache 74:
$engineConfig = array( 'servers' => explode( ',', W3TC_CONFIG_CACHE_REDIS_SERVERS ), 'persistent' => ( defined( 'W3TC_CONFIG_CACHE_REDIS_PERSISTENT' ) ? W3TC_CONFIG_CACHE_REDIS_PERSISTENT : true ), 'dbid' => ( defined( 'W3TC_CONFIG_CACHE_REDIS_DBID' ) ? W3TC_CONFIG_CACHE_REDIS_DBID : 0 ), 'password' => ( defined( 'W3TC_CONFIG_CACHE_REDIS_PASSWORD' ) ? W3TC_CONFIG_CACHE_REDIS_PASSWORD : '' ), 'key_version_mode' => 'disabled' );
The returned config is missing the keys that are expected.
The issue was introduced in version 2.2.2.
Downgrading to 2.2.1 removes the warnings.Additionally, there are multiple deprecation notices:
Deprecated: Redis::pconnect(): Passing null to parameter #3 ($timeout) of type float is deprecated in ...plugins/w3-total-cache/Cache_Redis.php on line 506
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Undefined array key “timeout”’ is closed to new replies.