You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A cart session can end up in a state where line_item_id no longer exists. This results in a PHP fatal error (or warning depending on PHP version)
To Reproduce
Have a renewal in the cart
Maybe logout. Something happens to the session data such that line_item_id is removed ¯_(ツ)_/¯
Presumably log back in and continue on with trying to complete checkout with the renewal
Depending on PHP version:
[25-Sep-2023 13:16:58 UTC] PHP Notice: Undefined offset: 7777777 in /apps/no-pong/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php on line 433
[25-Sep-2023 13:16:58 UTC] PHP Notice: Trying to access array offset on value of type null in /apps/no-pong/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php on line 435
[25-Sep-2023 13:16:58 UTC] PHP Notice: Trying to access array offset on value of type null in /apps/no-pong/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php on line 450
[25-Sep-2023 13:16:58 UTC] PHP Notice: Trying to access array offset on value of type null in /apps/no-pong/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php on line 450
[25-Sep-2023 13:16:58 UTC] PHP Warning: array_sum() expects parameter 1 to be array, null given in /apps/no-pong/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php on line 450
Or a fatal error for similar.
Expected behavior
A WooCommerce notice or something less brutal than a fatal error.
Actual behavior
Product impact
[x ] Does this issue affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
Does this issue affect WooCommerce Payments? yes/no/tbc, add issue ref
Additional context
7072656-zen
The text was updated successfully, but these errors were encountered:
Describe the bug
A cart session can end up in a state where
line_item_id
no longer exists. This results in a PHP fatal error (or warning depending on PHP version)To Reproduce
Or a fatal error for similar.
Expected behavior
A WooCommerce notice or something less brutal than a fatal error.
Actual behavior
Product impact
Additional context
7072656-zen
The text was updated successfully, but these errors were encountered: