Closed (fixed)
Project:
Crop Entity
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2015 at 10:38 UTC
Updated:
27 Oct 2016 at 06:44 UTC
Jump to comment: Most recent, Most recent file
When calling loadCropRelations with an empty array, the resulting db_select-query fails fatally:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))
ORDER BY delta ASC' at line 2: SELECT ceu.*
FROM
{crop_entity_usage} ceu
WHERE (referencing_entity_type = :db_condition_placeholder_0) AND (referencing_entity_id IN ())
ORDER BY delta ASC; Array
(
[:db_condition_placeholder_0] => node
)
When the function handles being called with an array of entities, it should also handle being called with an empty array.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | loadcroprelations_does-2618866-2.patch | 822 bytes | mian3010 |
Comments
Comment #2
mian3010 commentedAttached proposed solution
Comment #4
kristougher commented