diff --git a/lib/Phpfastcache/Drivers/Memcached/Driver.php b/lib/Phpfastcache/Drivers/Memcached/Driver.php index a7e1c74b9..140ceca9f 100644 --- a/lib/Phpfastcache/Drivers/Memcached/Driver.php +++ b/lib/Phpfastcache/Drivers/Memcached/Driver.php @@ -194,9 +194,9 @@ protected function driverClear(): 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['version'] = $stats['version'] ?? $this->instance->getVersion(); + $stats['bytes'] = $stats['bytes'] ?? 0; $date = (new \DateTime())->setTimestamp(\time() - $stats['uptime']);