Commit fd3f6173 authored by Jeremy Mikola's avatar Jeremy Mikola

Return findAndModify result document as an array

parent 30444c7a
......@@ -497,7 +497,7 @@ class Collection
$doc = current($this->_runCommand($this->dbname, $cmd)->toArray());
if ($doc["ok"]) {
return $doc["value"];
return is_object($doc["value"]) ? (array) $doc["value"] : $doc["value"];
}
throw $this->_generateCommandException($doc);
......@@ -534,7 +534,7 @@ class Collection
$doc = current($this->_runCommand($this->dbname, $cmd)->toArray());
if ($doc["ok"]) {
return $doc["value"];
return is_object($doc["value"]) ? (array) $doc["value"] : $doc["value"];
}
throw $this->_generateCommandException($doc);
......@@ -572,7 +572,7 @@ class Collection
$doc = current($this->_runCommand($this->dbname, $cmd)->toArray());
if ($doc["ok"]) {
return $doc["value"];
return is_object($doc["value"]) ? (array) $doc["value"] : $doc["value"];
}
throw $this->_generateCommandException($doc);
......
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