@@ -1038,7 +1038,7 @@ public function replaceOne(array $filter, array $update, array $options = array(
1038
1038
if (isset ($ firstKey [0 ]) && $ firstKey [0 ] == '$ ' ) {
1039
1039
throw new InvalidArgumentException ("First key in \$update must NOT be a \$operator " );
1040
1040
}
1041
- $ wr = $ this ->_update ($ filter , $ update , $ options );
1041
+ $ wr = $ this ->_update ($ filter , $ update , $ options + array ( " multi " => false ) );
1042
1042
1043
1043
return new UpdateResult ($ wr );
1044
1044
}
@@ -1057,7 +1057,7 @@ public function replaceOne(array $filter, array $update, array $options = array(
1057
1057
*/
1058
1058
public function updateMany (array $ filter , $ update , array $ options = array ())
1059
1059
{
1060
- $ wr = $ this ->_update ($ filter , $ update , $ options + array ("limit " => 0 ));
1060
+ $ wr = $ this ->_update ($ filter , $ update , $ options + array ("multi " => true ));
1061
1061
1062
1062
return new UpdateResult ($ wr );
1063
1063
}
@@ -1080,7 +1080,7 @@ public function updateOne(array $filter, array $update, array $options = array()
1080
1080
if (!isset ($ firstKey [0 ]) || $ firstKey [0 ] != '$ ' ) {
1081
1081
throw new InvalidArgumentException ("First key in \$update must be a \$operator " );
1082
1082
}
1083
- $ wr = $ this ->_update ($ filter , $ update , $ options );
1083
+ $ wr = $ this ->_update ($ filter , $ update , $ options + array ( " multi " => false ) );
1084
1084
1085
1085
return new UpdateResult ($ wr );
1086
1086
}
0 commit comments