diff --git a/src/ChangeStream.php b/src/ChangeStream.php index 5a0a76924..7260f495d 100644 --- a/src/ChangeStream.php +++ b/src/ChangeStream.php @@ -261,7 +261,7 @@ private function onIteration(bool $incrementKey): void * have been received in the last response. Therefore, we can unset the * resumeCallable. This will free any reference to Watch as well as the * only reference to any implicit session created therein. */ - if ((string) $this->getCursorId() === '0') { + if ((string) $this->getCursorId(true) === '0') { $this->resumeCallable = null; } diff --git a/tests/GridFS/StreamWrapperFunctionalTest.php b/tests/GridFS/StreamWrapperFunctionalTest.php index 8aea21915..fc8c45523 100644 --- a/tests/GridFS/StreamWrapperFunctionalTest.php +++ b/tests/GridFS/StreamWrapperFunctionalTest.php @@ -46,7 +46,7 @@ public function setUp(): void parent::setUp(); $this->filesCollection->insertMany([ - ['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime('1484202200000')], + ['_id' => 'length-10', 'length' => 10, 'chunkSize' => 4, 'uploadDate' => new UTCDateTime(1484202200000)], ]); $this->chunksCollection->insertMany([