From b03754363f349d5d87ae9b9e6c089d1f2e7ee5ec Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 17 Oct 2024 09:18:54 +0200 Subject: [PATCH] fix deprecated creation of dynamic property --- api/src/Cache/Memcached.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/api/src/Cache/Memcached.php b/api/src/Cache/Memcached.php index ade61d1ac9..b85489e7ec 100644 --- a/api/src/Cache/Memcached.php +++ b/api/src/Cache/Memcached.php @@ -22,9 +22,9 @@ namespace EGroupware\Api\Cache; * $GLOBALS['egw_info']['server']['cache_provider_instance'] = array('EGroupware\Api\Cache\Memcached','localhost'[,'otherhost:port']); * and optional also $GLOBALS['egw_info']['server']['cache_provider_tree'] (defaults to instance) * - * You can set more then one server and specify a port, if it's not the default one 11211. + * You can set more than one server and specify a port, if it's not the default one 11211. * - * It allows addtional named parameters "timeout" (default 20ms), "retry" (default not) and "prefix". + * It allows additional named parameters "timeout" (default 20ms), "retry" (default not) and "prefix". * * If igbinary extension is available, it is prefered over PHP (un)serialize. */ @@ -60,6 +60,11 @@ class Memcached extends Base implements ProviderMultiple */ private $retry = 0; + /** + * @var array + */ + protected $params; + /** * Constructor, eg. opens the connection to the backend * @@ -70,7 +75,7 @@ class Memcached extends Base implements ProviderMultiple */ function __construct(array $params=null) { - $this->params = $params ? $params : array('localhost'); // some reasonable default + $this->params = $params ?: array('localhost'); // some reasonable default if (isset($params['timeout'])) { @@ -297,4 +302,4 @@ class Memcached extends Base implements ProviderMultiple { return implode('::',$keys); } -} +} \ No newline at end of file