php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63001 MongoCollection::insert() doesn't take `true` for safe insert
Submitted: 2012-09-02 21:52 UTC Modified: 2013-07-14 19:38 UTC
From: jeremy dot benoist at gmail dot com Assigned: derick (profile)
Status: Closed Package: mongo (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jeremy dot benoist at gmail dot com
New email:
PHP Version: OS:

 

 [2012-09-02 21:52 UTC] jeremy dot benoist at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/mongocollection.insert#example-1449
---

As described in the revision log:

> The options parameter does no longer accept just a boolean to signify a safe 
insert. Instead, this now has to be done with array('safe' => true).

The example (on both code part) of the page display the second argument as a 
boolean instead of an array:

> $collection->insert($person, true);

Should be 

> $collection->insert($person, array('safe' => true));

Expected result:
----------------
$collection->insert($person, array('safe' => true));

Actual result:
--------------
$collection->insert($person, true);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-08 16:09 UTC] laruence@php.net
-Package: Unknown/Other Function +Package: mongo
 [2012-09-08 16:09 UTC] laruence@php.net
change package
 [2013-07-14 19:38 UTC] derick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: derick
 [2013-07-14 19:38 UTC] derick@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC