The static variable $connections appears to be unused in mongodb_collection(). I think this is probably a typo of $collections, which would fit, judging by how $collections is used later in this function.

Proposed patch attached.

Comments

alan evans’s picture

StatusFileSize
new609 bytes
alan evans’s picture

StatusFileSize
new694 bytes

Remaking patch from module dir.

crea’s picture

Marked #777406: Error in mongodb_collection() duplicate of this.

chx’s picture

Status: Needs review » Closed (won't fix)

This is no longer relevant.

crea’s picture

@chx
Why ? Bug is still there

crea’s picture

Status: Closed (won't fix) » Active
chx’s picture

Oh sorry 6.x. Sure. crea, want commit access? I am not interested in maintaining 6.x. I closed this down because 7.x has so much nicer collection handling now and actually it needs to be backported and then this issue will be irrelevant to 6.x too.

crea’s picture

Sure :) I'll see what I can do

Btw, do you have Mongo connection exception handling ? So when for some mystical reason MongoDB is down and we use it for something not critical e.g. cache, we won't have broken site ?

chx’s picture

crea welcome to the MongoDB team! :) Please help maintaing 6.x-1.x and yes please file an issue for exception handling.

thebuckst0p’s picture

Status: Active » Fixed

This was still open, I committed it to 6.x-1.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.