Skip to content

Commit 81e9841

Browse files
committed
Fixed #759
1 parent 640cb82 commit 81e9841

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Phpfastcache/Drivers/Memcached/Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ public function driverCheck(): bool
6868
public function getStats(): DriverStatistic
6969
{
7070
$stats = current($this->instance->getStats());
71-
$stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
72-
$stats['version'] = (isset($stats['version']) ? $stats['version'] : $this->instance->getVersion());
73-
$stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
71+
$stats['uptime'] = $stats['uptime'] ?? 0;
72+
$stats['bytes'] = $stats['bytes'] ?? 0;
73+
$stats['version'] = $stats['version'] ?? $this->instance->getVersion();
7474

7575
$date = (new DateTime())->setTimestamp(time() - $stats['uptime']);
7676

0 commit comments

Comments
 (0)