Skip to content

Commit 20b538f

Browse files
committed
Mongodb sometimes does not return the Collstat size
1 parent 2a94db2 commit 20b538f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/phpFastCache/Drivers/Mongodb/Driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function getStats()
207207

208208
$stats = (new driverStatistic())
209209
->setInfo('MongoDB version ' . $serverStatus[ 'version' ] . ', Uptime (in days): ' . round($serverStatus[ 'uptime' ] / 86400, 1) . "\n For more information see RawData.")
210-
->setSize((int) $collStats[ 'size' ])
210+
->setSize((int) @$collStats[ 'size' ])
211211
->setData(implode(', ', array_keys($this->itemInstances)))
212212
->setRawData([
213213
'serverStatus' => $serverStatus,

0 commit comments

Comments
 (0)