X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FMemcachedClient.php;h=1cc07b71ef444293cbc873801ee3d56db6f749e9;hb=1fe53f1a33168b865c80121ca3c266a45368a310;hp=59131b976a591deb812653dd8afa4ba70a7cbb78;hpb=967a96e7fa5910f8fc451590decb381dbfb481ba;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/MemcachedClient.php b/includes/libs/objectcache/MemcachedClient.php index 59131b976a..1cc07b71ef 100644 --- a/includes/libs/objectcache/MemcachedClient.php +++ b/includes/libs/objectcache/MemcachedClient.php @@ -259,11 +259,11 @@ class MemcachedClient { * @return mixed */ public function __construct( $args ) { - $this->set_servers( isset( $args['servers'] ) ? $args['servers'] : array() ); - $this->_debug = isset( $args['debug'] ) ? $args['debug'] : false; + $this->set_servers( $args['servers'] ?? array() ); + $this->_debug = $args['debug'] ?? false; $this->stats = array(); - $this->_compress_threshold = isset( $args['compress_threshold'] ) ? $args['compress_threshold'] : 0; - $this->_persistent = isset( $args['persistent'] ) ? $args['persistent'] : false; + $this->_compress_threshold = $args['compress_threshold'] ?? 0; + $this->_persistent = $args['persistent'] ?? false; $this->_compress_enable = true; $this->_have_zlib = function_exists( 'gzcompress' ); @@ -271,12 +271,12 @@ class MemcachedClient { $this->_host_dead = array(); $this->_timeout_seconds = 0; - $this->_timeout_microseconds = isset( $args['timeout'] ) ? $args['timeout'] : 500000; + $this->_timeout_microseconds = $args['timeout'] ?? 500000; - $this->_connect_timeout = isset( $args['connect_timeout'] ) ? $args['connect_timeout'] : 0.1; + $this->_connect_timeout = $args['connect_timeout'] ?? 0.1; $this->_connect_attempts = 2; - $this->_logger = isset( $args['logger'] ) ? $args['logger'] : new NullLogger(); + $this->_logger = $args['logger'] ?? new NullLogger(); } // }}}