I found out that comments header of the $flag->get_user_count() function could be really misguiding. It says that the function returns the number of items. But actually it doesn't return any numbers, it returns executed db_select() object instead.
I suppose it could be appropriate to add fetchField() call to the function so users won't have to go through the code and will got a number in return as they probably expect to.

Files: 
CommentFileSizeAuthor
#1 get_user_count-1352274-1.patch393 bytesjoelstein

Comments

Status:Active» Needs review
StatusFileSize
new393 bytes

I completely agree. Attached is a patch which accomplishes this.

Version:7.x-2.0-beta6» 7.x-2.x-dev

Will somebody please review this simple patch? It corrects expected functionality. Thanks!

I gave it a quick test and don't see any issues.

Thanks! Want to mark it as "reviewed & tested by the community"?

Status:Needs review» Reviewed & tested by the community

Opps, sorry.

Status:Reviewed & tested by the community» Closed (fixed)

Looks good.

Committed to dev: http://drupalcode.org/project/flag.git/commit/4f321b8

Marking closed (fixed).