We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0534ed0 + 4cfe182 commit 9813df1Copy full SHA for 9813df1
src/Operation/FindAndModify.php
@@ -217,17 +217,6 @@ public function execute(Server $server)
217
return null;
218
}
219
220
- /* Prior to 3.0, findAndModify returns an empty document instead of null
221
- * when an upsert is performed and the pre-modified document was
222
- * requested.
223
- */
224
- if ($this->options['upsert'] && ! $this->options['new'] &&
225
- isset($result->lastErrorObject->updatedExisting) &&
226
- ! $result->lastErrorObject->updatedExisting) {
227
-
228
- return null;
229
- }
230
231
if ( ! is_object($result->value)) {
232
throw new UnexpectedValueException('findAndModify command did not return a "value" document');
233
0 commit comments