diff --git a/lib/Phpfastcache/Drivers/Memcached/Driver.php b/lib/Phpfastcache/Drivers/Memcached/Driver.php index fa4d92f15..e890eb41e 100644 --- a/lib/Phpfastcache/Drivers/Memcached/Driver.php +++ b/lib/Phpfastcache/Drivers/Memcached/Driver.php @@ -68,9 +68,9 @@ public function driverCheck(): bool public function getStats(): DriverStatistic { $stats = current($this->instance->getStats()); - $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0); - $stats['version'] = (isset($stats['version']) ? $stats['version'] : $this->instance->getVersion()); - $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0); + $stats['uptime'] = $stats['uptime'] ?? 0; + $stats['bytes'] = $stats['bytes'] ?? 0; + $stats['version'] = $stats['version'] ?? $this->instance->getVersion(); $date = (new DateTime())->setTimestamp(time() - $stats['uptime']);