Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When no shipping services are defined (that could happen if I'm only interested in capture shipping address) a warning arise:
Notice: Undefined index: shipping_rates in commerce_shipping_pane_checkout_form_validate() (line 257 of /Users/pablocc/Sites/bluesparklabs/PDGA/www/sites/all/modules/contrib/commerce_shipping/includes/commerce_shipping.checkout_pane.inc).
This is resolved simply adding isset call in the line.
Comments
Comment #1
citlacom CreditAttribution: citlacom commentedHere the patch.
Comment #2
citlacom CreditAttribution: citlacom commentedPrevious patch miss a parenthesis, use this instead.
Comment #3
jwilson3I can confirm this patch does what it says, but since I'm working on the same project as citlacom, will leave it to someone else to also verify.
Comment #4
rszrama CreditAttribution: rszrama commentedI actually don't have this problem. We do define this variable whether there are services or not in the form builder:
My hunch is you have an alteration or something that's interfering with the code from working; or it's just something that's beyond me. That said, I prefer empty() checks to using a mixed type variable as a boolean. I'll update the validate handler to use that. : )