Skip to content

Commit 878896c

Browse files
Will Banfieldjmikola
authored andcommitted
uncommented argument check
1 parent 8fe879a commit 878896c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Operation/FindOneAndUpdate.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public function __construct($databaseName, $collectionName, $filter, $update, ar
6464
throw InvalidArgumentException::invalidType('$update', $update, 'array or object');
6565
}
6666

67-
// if ( ! \MongoDB\is_first_key_operator($update)) {
68-
// throw new InvalidArgumentException('First key in $update argument is not an update operator');
69-
// }
67+
if ( ! \MongoDB\is_first_key_operator($update)) {
68+
throw new InvalidArgumentException('First key in $update argument is not an update operator');
69+
}
7070

7171
$options += [
7272
'returnDocument' => self::RETURN_DOCUMENT_BEFORE,

0 commit comments

Comments
 (0)