Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product reference
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2013 at 01:21 UTC
Updated:
26 Apr 2013 at 00:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
rszrama commentedAhh, drat. Naturally you find the use case that breaks a new feature after rolling the release. The reason you have this issue is because we added this function in Commerce 1.6 to allow other modules the opportunity to implement different rules for determining the default product in a multi-value product reference field. However, all of our tests were with actual data in the field. In your case, you have an empty multi-value product reference field, so when it goes to try and determine the default product in the group, it comes up empty. Hence the notice.
In truth, this function should never be called with an empty array. I've fixed the place that allowed this to happen to no longer attempt to do so. Either apply the attached patch or update to 7.x-1.x-dev to have the fix.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/26608da
Comment #2
noelgross commentedPerfecto! Updating to the latest dev did the trick. Thanks, Ryan!