Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object
Merge pull request #685 from bjori/PHP-1084-update-with-object-crashes

Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object

* bjori/PHP-1084-update-with-object-crashes:
  Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object