Commit c8eefea7 authored by Jeremy Mikola's avatar Jeremy Mikola

PHPLIB-107: Fix return statement when dropping nonexistent collection

parent abffc315
...@@ -45,7 +45,7 @@ class DropCollection implements Executable ...@@ -45,7 +45,7 @@ class DropCollection implements Executable
$cursor = $server->executeCommand($this->databaseName, new Command(array('drop' => $this->collectionName))); $cursor = $server->executeCommand($this->databaseName, new Command(array('drop' => $this->collectionName)));
} catch (DriverRuntimeException $e) { } catch (DriverRuntimeException $e) {
if ($e->getMessage() === 'ns not found') { if ($e->getMessage() === 'ns not found') {
$result = (object) ['ok' => 0, 'errmsg' => 'ns not found']; return (object) ['ok' => 0, 'errmsg' => 'ns not found'];
} }
throw $e; throw $e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment