Needs work
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2012 at 22:17 UTC
Updated:
29 Jan 2019 at 22:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
geek-merlincorrection
Comment #1
geek-merlinwe need a simple patch like this to prevent foreach eating NULL values.
Comment #2
pyrello commentedPatch from #1 appears to work.
Comment #3
amitaibuSorry for the late reply... :)
Seems to be already resolved.
Comment #4
davidi commentedIs there a reason this patch was never applied. I am migrating one of our drupal sites and noticed that a developer had this patch code in our entityreference.module. Looking in the source repository, I don't see the fix merged in anywhere. Is it necessary? If so can the patch be applied in the next release?
Thanks
Comment #5
jrbeemanRe-opening as we ran into this issue during a Commons sprint. Commons uses a combination of OG, Entity Reference Prepopulate, and Entity Reference. In cases where a prepopulate argument isn't passed in the URL, we receive this warning. I believe the fix is simple: Don't assume $items has a value. Patch attached against 7.x-1.x.
Comment #6
khanz commentedfacing the same issue..
Comment #7
daniel-san commentedWas receiving same error on creation of node where a prepopulate argument isn't passed in the URL.
Patch in #5 seems to work well.
Thank you for working on this.
Comment #8
micnap commentedDitto daniel-san.
Comment #9
hefox commentedMy guess is whatever is calling that function is suppose to be passing in $items an array and that the error may be from the calling function instead. Not experiencing this error so haven't looked inot
Comment #9.0
hefox commentedcorrection
Comment #10
chris matthews commentedThe 6 year old patch in #5 to entityreference.module does not apply to the latest 7.x-1.x-dev and if still relevant needs a reroll.