@@ -223,7 +223,7 @@ public function bulkWrite(array $bulk, array $options = array())
223
223
if (!isset ($ args [1 ])) {
224
224
throw new InvalidArgumentException (sprintf ("Missing argument#2 for '%s' (operation#%d) " , $ opname , $ n ));
225
225
}
226
- $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("limit " => 0 ));
226
+ $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("multi " => true ));
227
227
228
228
$ bulk ->update ($ args [0 ], $ args [1 ], $ options );
229
229
break ;
@@ -232,7 +232,7 @@ public function bulkWrite(array $bulk, array $options = array())
232
232
if (!isset ($ args [1 ])) {
233
233
throw new InvalidArgumentException (sprintf ("Missing argument#2 for '%s' (operation#%d) " , $ opname , $ n ));
234
234
}
235
- $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("limit " => 1 ));
235
+ $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("multi " => false ));
236
236
$ firstKey = key ($ args [1 ]);
237
237
if (!isset ($ firstKey [0 ]) || $ firstKey [0 ] != '$ ' ) {
238
238
throw new InvalidArgumentException ("First key in \$update must be a \$operator " );
@@ -245,7 +245,7 @@ public function bulkWrite(array $bulk, array $options = array())
245
245
if (!isset ($ args [1 ])) {
246
246
throw new InvalidArgumentException (sprintf ("Missing argument#2 for '%s' (operation#%d) " , $ opname , $ n ));
247
247
}
248
- $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("limit " => 1 ));
248
+ $ options = array_merge ($ this ->getWriteOptions (), isset ($ args [2 ]) ? $ args [2 ] : array (), array ("multi " => false ));
249
249
$ firstKey = key ($ args [1 ]);
250
250
if (isset ($ firstKey [0 ]) && $ firstKey [0 ] == '$ ' ) {
251
251
throw new InvalidArgumentException ("First key in \$update must NOT be a \$operator " );
0 commit comments