Skip to content

Commit

Permalink
Merge pull request #12 from juanitomint/master
Browse files Browse the repository at this point in the history
Prevent Numeric keys to be lost during merge
  • Loading branch information
Alessandro Arnodo committed Jul 24, 2012
2 parents 7323a0f + cc3bb1e commit 7a37bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/cimongo/Cimongo.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public function update($collection = "", $data = array(), $options = array()){
}
if (is_array($data) && count($data) > 0){
$this->_update_init('$set');
$this->updates['$set'] = array_merge($this->updates['$set'], $data);
$this->updates['$set'] += $data;
}
if (count($this->updates) == 0){
show_error("Nothing to update in Mongo collection or update is not an array", 500);
Expand Down

0 comments on commit 7a37bfa

Please sign in to comment.