Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2012 at 16:34 UTC
Updated:
2 Feb 2012 at 08:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
amateescu commentedAnd the patch :)
Comment #2
mr.baileysI think the use of 'continue' is discouraged since it makes the program flow harder to follow. What about wrapping the offending code in an "if (isset($product_fields['commerce_product'])) {...}? Same goes for the return statement. This would also make the comment unnecessary since the if (isset ...) is self-explanatory.
Comment #3
amateescu commentedI did an 'if' initially, but the code is actually harder to read if indented too much, so I changed that to continue and return.
Also, 'continue' is already used a few lines above in this function, I'm guessing for the same code readability reasons:
http://drupalcode.org/project/commerce.git/blob/refs/heads/7.x-1.x:/modu...
Comment #4
amateescu commentedTagging. It's an easy enough fix to not get it in 1.2 :)
It also makes the uninstalling experience from #1403972: Make uninstallation possible again much more pleasant.
Comment #5
mr.baileysOther than the remarks in #2 (you're right, I didn't spot the
continuealready there), the patch looks good and I can confirm that it fixes the notices.Comment #6
rszrama commentedCommitted as is. Yay.