Needs work
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2012 at 18:19 UTC
Updated:
6 Aug 2015 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nerilka commentedHi
I got the same when I create a relationship from a content-with-an-entity-reference-field referencing some contents.
Comment #2
catchThis isn't a bug in entitycache, it only happens if a module calls entity_load() with the wrong arguments, and will be the same with entitycache disabled. Please open bug reports with the contrib module causing the warning.
Comment #3
reubenavery commented@catch, yes you are correct.. i'm seeing a lot of this happening from file_entity, for example. it's passing an $ids argument of array(0 => NULL) to EntityCacheControllerHelper::entityCacheLoad()
attached is a patch that will apply an array_filter against this and eliminates errors being kicked up.
Comment #4
reubenavery commentedThe patch in #3 fails in the case of an $id arg being equal to 0 as in the case of anonymous user #0.
Here's a correction that filters out anything that is neither numeric or a string.
Comment #5
catchPlease file a patch against file_entity module to fix the bug there. Hiding this with an array_filter() is just suppressing a valid error.
Comment #6
bryancasler commentedThis was against x 7.x-1.1, but I can't select that anymore.
Comment #7
dave reidI believe this would have been fixed by #2132383: Warning: array_flip(): Can only flip STRING and INTEGER values! .. DrupalDefaultEntityController->load() (.. 176 .. entity.inc). already. If you are still getting this on the most recent release, then please re-open.