Closed (fixed)
Project:
Relation Select
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2012 at 15:10 UTC
Updated:
6 Feb 2013 at 17:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
fozzy commentedSubscribing
Comment #2
steveoliver commentedFixed in 37b291c. Thanks, daniela.
Comment #3
fozzy commentedThanks for the patch. I applied it and the Undefined offset message disappeared.
Unfortunately I'm getting now the following message : Undefined index: entity_id in _relation_select_field_widget_form() (line 550 of relation_select.module).
Obviously related to the patch...
Comment #4
robertom commentedSorry for my bad english.
After updated to last git version, I have: Undefined index: entity_id in _relation_select_field_widget_form()
I would propose a patch that has implicit is_object and is_array
Comment #5
fozzy commentedPatch #4 applied. Looks ok.
Thanks
Comment #6
robertom commentedreroll patch #4
Comment #7
robertom commentedreroll patch #6
Comment #8
steveoliver commentedmaybe something like this would be a more proper check?
Comment #9
robertom commentedSorry for my bad english
If
isset($items[$delta]->rid)is true$items[$delta]must be an objectand
if
isset($items[$delta]['relation_id']is true$items[$delta]must be an arrayI think additional check is redundant, but the fix will work well also with extra check... so you could commit what you prefer ;)
Comment #10
steveoliver commentedI was thinking we may get "Trying to get property of non-object" errors in the case where
$items[$delta]is an array. But you're right, isset won't throw that error -- but calling the property without checking *would* (as you pointed out in #4) :)Committed #7 in 559ec71.
Thanks, @robertom.