Hi all,
After enabling the stream context block for an organic groups page, I am getting the following:
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of C:\wamp\www\learnsys\includes\entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of C:\wamp\www\learnsys\includes\entity.inc).I notice that this is only when the actual comment box is displayed, if I turn that off, no errors. Anyone else getting this or does anyone have an idea of how to begin solving this?
Thanks,
kevin
Comments
Comment #1
aleixI've found the same and in my case is solved patching og.module as: http://drupal.org/node/1368930 says.
If not... get your hands dirty and do some backtraces.
Comment #2
icecreamyou commentedThe error probably happens when Statuses calls og_is_member() in statuses.context.inc lines 234, 243, and 248 if og_get_group_ids() returns an empty array. The solution should just be to check if we get an empty array before calling og_is_member() in those cases.
Comment #3
rabisg commentedcame up with a patch based on IceCreamYou's suggestion. It doesn't really change much. But still attaching the patch as it is a good idea to check whether array is empty or not before passing it in a function.
Comment #4
icecreamyou commentedUse spaces instead of tabs, and all non-ternary conditions should be wrapped in curly braces. Other than that this looks fine
Comment #5
rabisg commentedComment #6
icecreamyou commentedWrong spacing. Each block level should be indented exactly 2 spaces from its parent block
There needs to be a space between language constructs and parenthesis, i.e.
if (condition)notif(condition). This problem occurs several timesstill tab here
still tabs here
the body of a block should be indented
Comment #7
rabisg commentedSorry for being a little careless last time. Hope this does it.
Comment #8
icecreamyou commentedCommitted patch in #7 to dev. Thanks!