php.net |  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
Votes:1
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 - 3 = ?
Subscribe to this entry?

 
 [2012-02-26 22:12 UTC] joaojose at webkaput dot com
Description:
------------
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-18 22:20 UTC] bjori@php.net
I cannot reproduce this... This was probably fixed long long time ago.
I've created a testcase for it though; https://github.com/mongodb/mongo-php-
driver/pull/276
 [2013-01-18 22:20 UTC] bjori@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bjori
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC