Skip to content

Commit ead7cf1

Browse files
author
Will Banfield
committed
uncommented argument check
1 parent a81bb85 commit ead7cf1

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
@@ -59,9 +59,9 @@ public function __construct($databaseName, $collectionName, $filter, $update, ar
5959
throw new InvalidArgumentTypeException('$update', $update, 'array or object');
6060
}
6161

62-
// if ( ! \MongoDB\is_first_key_operator($update)) {
63-
// throw new InvalidArgumentException('First key in $update argument is not an update operator');
64-
// }
62+
if ( ! \MongoDB\is_first_key_operator($update)) {
63+
throw new InvalidArgumentException('First key in $update argument is not an update operator');
64+
}
6565

6666
$options += [
6767
'returnDocument' => self::RETURN_DOCUMENT_BEFORE,

0 commit comments

Comments
 (0)