field_usergroup.inc contrib module generates invalid query when the where clause is empty.

A check needs to be added to see if the where clause is empty, if so, "WHERE" it should not be appended to the query.

CommentFileSizeAuthor
#1 flexinode.patch_2.txt969 bytesNimish P

Comments

Nimish P’s picture

Status: Active » Needs review
StatusFileSize
new969 bytes

Here is a patch that works for 4.6.0 version of flexinode.

Bèr Kessels’s picture

It seems this is also a problem in HEAD, is that correct?

Also, please do not add a ?> at the end. In Drupal we never add that ?> closing PHP tag!

Can someone please test this patch? It looks good, but I want it to be tested in a 4.6 environment with real data please.