Closed (fixed)
Project:
Election
Version:
7.x-1.x-dev
Component:
election_vote
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2015 at 13:49 UTC
Updated:
8 Dec 2015 at 17:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pjcdawkins commentedSilly me of 1 year ago... please check this patch
Comment #4
pjcdawkins commentedComment #6
yeebot commentedThanks very much for your swift response Patrick! That patch seems to have done the trick.
Comment #8
pjcdawkins commentedThanks for the report - committed
Comment #9
liam morlandIs the error that the following code fails when $ballot_ids is an empty array?
If so, that sounds like it is also a bug in the DB abstraction layer. If given an invalid query, it should return false, raise an exception, or something like that, not query the DB server and thereby return a confusing error message.
Comment #10
pjcdawkins commentedYes, this:
->condition('column', array(), 'IN')translates as:
column IN ()and that is a syntax error in MySQL
It's possible the abstraction layer doesn't throw an exception when you construct a query like that because some DBs would accept
column IN ()as valid SQL (and presumably the condition would never match). I'm not sure.Comment #11
liam morlandExisting issue: #1976666: db_select()->condition() doesn't guard against empty set conditions.