I noticed this with the last bug in the same block but forgot to patch it.. This is a very unlikely situation when the user list is empty but the block is enabled.. but it probably has to be added in anyways.

Cheers
-K

Comments

robin monks’s picture

Status: Needs review » Reviewed & tested by the community

+1

All works well and looks good.

Robin

dries’s picture

It's probably better to put the check in theme_user_list(). See theme_item_list() for an example. Also, maybe you should use !empty() rather than isset().

Uwe Hermann’s picture

Status: Reviewed & tested by the community » Needs work

Needs more work.

robin monks’s picture

Status: Needs work » Needs review
StatusFileSize
new723 bytes

New patch.

Zen’s picture

StatusFileSize
new1.04 KB

Sorry mate - didn't notice that you were working on a patch for this too :)

Either way, the attached patch also covers a similar issue with the Who's online block. Also, the return() should be outside the empty() check, else I don't think we'll get a block, empty as it may be.

Cheers
-K

Bèr Kessels’s picture

should it not be isset() ?

Bèr Kessels’s picture

NM my last comment. I had this one in a tab. and should have refreshed before commenting.

Anyway. I tested zens patch, and it works as advertised.

Zen’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the speedy reviews :)

Cheers,
-K

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Zen’s picture

Status: Fixed » Closed (fixed)