X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fconfig%2FEtcdConfig.php;h=f3d38494764529a8a189e1257b831d71ef88d676;hp=7020159fd7d72cfcc0a278a00b4ec265ca82e445;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hpb=a6abe2ad7a1ed2c8dd29f35a9f6c40f85e12b7ab diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php index 7020159fd7..f3d3849476 100644 --- a/includes/config/EtcdConfig.php +++ b/includes/config/EtcdConfig.php @@ -161,6 +161,7 @@ class EtcdConfig implements Config, LoggerAwareInterface { if ( is_array( $etcdResponse['config'] ) ) { // Avoid having all servers expire cache keys at the same time $expiry = microtime( true ) + $this->baseCacheTTL; + // @phan-suppress-next-line PhanTypeMismatchArgumentInternal $expiry += mt_rand( 0, 1e6 ) / 1e6 * $this->skewCacheTTL; $data = [ 'config' => $etcdResponse['config'], @@ -326,7 +327,7 @@ class EtcdConfig implements Config, LoggerAwareInterface { private function unserialize( $string ) { if ( $this->encoding === 'YAML' ) { return yaml_parse( $string ); - } else { // JSON + } else { return json_decode( $string, true ); } }