On line 878 in the quotes.module file, '1' is returned as a default value. This will result in a query like: "..... AND 1". This might work in MySQL however in Postgres this won't because it is not a boolean. Better might be to return as a default 'TRUE', or more common (and how I fixed it): '1=1'...

Comments

nancydru’s picture

Are you actually using role filtering? I can't see it having that much utility.

In my case, the actual SQL code is "...AND (1 in (3))..." which I would think was valid, albeit unusual. I still need to see what happens when no roles are chosen.

nancydru’s picture

Yes, I see what you mean. "quotes_block_where_sql" should (at least) have the return changed to:

  return ($where ? implode(' AND ', $where) : '1=1');

I'd rather see the calling code not include anything if there are no filters.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Fixed

Fix committed.

nancydru’s picture

Status: Fixed » Closed (fixed)