From 612190a42d91f16f6d1beeb577c27f44f4958171 Mon Sep 17 00:00:00 2001 From: Israt Jahan Farzana Date: Fri, 27 Oct 2023 15:54:20 +0100 Subject: [PATCH] Bugfix 4.0.5: Proof of play (#2186) --- lib/Storage/MongoDbTimeSeriesStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Storage/MongoDbTimeSeriesStore.php b/lib/Storage/MongoDbTimeSeriesStore.php index 6c8a3197ce..3abb12ea83 100644 --- a/lib/Storage/MongoDbTimeSeriesStore.php +++ b/lib/Storage/MongoDbTimeSeriesStore.php @@ -390,7 +390,7 @@ public function addStatFinalize() try { $cursor = $collectionPeriod->findOne(['name' => 'period']); - if (count($cursor) <= 0) { + if ($cursor === null) { $this->log->error('Period collection does not exist in Mongo DB.'); // Period collection created $collectionPeriod->insertOne(['name' => 'period']);