Skip to content

Commit c8eefea

Browse files
committed
PHPLIB-107: Fix return statement when dropping nonexistent collection
1 parent abffc31 commit c8eefea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Operation/DropCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function execute(Server $server)
4545
$cursor = $server->executeCommand($this->databaseName, new Command(array('drop' => $this->collectionName)));
4646
} catch (DriverRuntimeException $e) {
4747
if ($e->getMessage() === 'ns not found') {
48-
$result = (object) ['ok' => 0, 'errmsg' => 'ns not found'];
48+
return (object) ['ok' => 0, 'errmsg' => 'ns not found'];
4949
}
5050

5151
throw $e;

0 commit comments

Comments
 (0)