|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61190 MongoGridFS::put no returning MongoId despite inserting file
Submitted: 2012-02-26 22:12 UTC Modified: 2013-01-18 22:20 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: joaojose at webkaput dot com Assigned: bjori (profile)
Status: Closed Package: mongo (PECL)
PHP Version: Irrelevant OS: Centos
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: joaojose at webkaput dot com
New email:
PHP Version: OS:


 [2012-02-26 22:12 UTC] joaojose at webkaput dot com
When trying to insert a file the MongoId isn't returned. Instead it returns empty despite the file being actually saved.

This happened after updating from Pecl Mongo 1.0.11 to 1.2.9. After reading the release notes of several releases I decided to downgrade to 1.2.4 and the script behaved as expected.

Test script:
$result = $this->getCollection()->put($filename, $rawData);
if($result !== false)
  //do something

Expected result:
Should return MongoId as per docs.

Actual result:
Returns empty


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-18 22:20 UTC]
I cannot reproduce this... This was probably fixed long long time ago.
I've created a testcase for it though;
 [2013-01-18 22:20 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: bjori
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 10 23:01:24 2021 UTC