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.
In PHP 8.0 Deprecation warnings arise in case of required parameter follows optional in function declaration:
Deprecated: Required parameter $options follows optional parameter $data in /modules/contrib/commerce/modules/cart/commerce_cart.module on line 1163
Deprecated: Required parameter $name follows optional parameter $data in /modules/contrib/commerce/modules/cart/commerce_cart.module on line 1163
Comment | File | Size | Author |
---|---|---|---|
#7 | commerce_core_cart-php8_deprecation_3284128#7.patch | 517 bytes | Floris Vedder |
| |||
#2 | commerce_core_cart-php8_deprecation_3284128.patch | 830 bytes | Natallia |
Comments
Comment #2
Natallia CreditAttribution: Natallia commentedComment #3
Natallia CreditAttribution: Natallia commentedComment #4
heni_deepak CreditAttribution: heni_deepak commentedI also facing the same issue.
Comment #5
apadernoComment #6
apadernoComment #7
Floris Vedder CreditAttribution: Floris Vedder at Atom commentedMade an adjustment to the patch so the path is based on the root of the contrib module.
Comment #8
apadernoComment #9
rszrama CreditAttribution: rszrama at Centarro commentedNo clue why we ever even had an optional first parameter on this callback. Doesn't appear we did that for the other custom metadata callbacks. Patch is great, thanks!
Comment #11
DamienMcKennaCould one of the maintainers please tag a new release with this fix included? Thank you.
Comment #13
bserem CreditAttribution: bserem at Annertech commentedA new release including this one is still pending
Comment #14
Neeraj420 CreditAttribution: Neeraj420 as a volunteer commentedafter applying the patch I am getting the following error
Error: Call to undefined function commerce_product_reference_get_default_product() in commerce_cart_field_formatter_view() (line 2763 of /website/sites/all/modules/commerce/modules/cart/commerce_cart.module).
kindly help.
Thanks in advance