Merge "FauxRequest: don’t override getValues()"
[lhc/web/wiklou.git] / includes / libs / objectcache / wancache / WANObjectCache.php
index a090e16..70f3553 100644 (file)
@@ -125,7 +125,7 @@ class WANObjectCache implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInt
        /** @var callable|null Function that takes a WAN cache callback and runs it later */
        protected $asyncHandler;
 
-       /** @bar bool Whether to use mcrouter key prefixing for routing */
+       /** @var bool Whether to use mcrouter key prefixing for routing */
        protected $mcrouterAware;
        /** @var string Physical region for mcrouter use */
        protected $region;
@@ -2488,8 +2488,9 @@ class WANObjectCache implements IExpiringStore, IStoreKeyEncoder, LoggerAwareInt
         */
        private function determineKeyClassForStats( $key ) {
                $parts = explode( ':', $key, 3 );
-
-               return $parts[1] ?? $parts[0]; // sanity
+               // Sanity fallback in case the key was not made by makeKey.
+               // Replace dots because they are special in StatsD (T232907)
+               return strtr( $parts[1] ?? $parts[0], '.', '_' );
        }
 
        /**