Skip to content

Commit f41ed65

Browse files
committed
Fix replacing a document after fixing PHP-1320
1 parent 664b545 commit f41ed65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MongoDB/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function replaceOne(array $filter, array $update, array $options = array()) { /*
216216
if (key($update)[0] == '$') {
217217
throw new \RuntimeException("First key in \$update must NOT be a \$operator");
218218
}
219-
return $this->_writeSingle($filter, self::UPDATE, $options, array('$set' => $update));
219+
return $this->_writeSingle($filter, self::UPDATE, $options, $update);
220220
} /* }}} */
221221
function updateMany(array $filter, $update, array $options = array()) { /* {{{ */
222222
return $this->_writeSingle($filter, self::UPDATE, $options + array("limit" => 0), $update);

0 commit comments

Comments
 (0)