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.

CommentFileSizeAuthor
#2 loadcroprelations_does-2618866-2.patch822 bytesmian3010

Comments

mian3010 created an issue. See original summary.

mian3010’s picture

StatusFileSize
new822 bytes

Attached proposed solution

  • mian3010 authored 6c36c43 on 7.x-1.x
    Issue #2618866 by mian3010: loadCropRelations does not handle being...
kristougher’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.