- Merge request !7Issue #3300892: Order/order item price could be NULL → (Merged) created by krystalcode
- 🇩🇪Germany Grevil
A similar problem arises in the module file, if the price is null:
TypeError: Drupal\commerce_price\Rounder::round(): Argument #1 ($price) must be of type Drupal\commerce_price\Price, null given, called in /var/www/html/web/modules/custom/facebook_pixel/modules/facebook_pixel_commerce/facebook_pixel_commerce.module on line 61 in Drupal\commerce_price\Rounder->round() (line 29 of modules/contrib/commerce/modules/price/src/Rounder.php).
Let's fix that here as well.
- Status changed to Needs review
7 months ago 8:28am 28 June 2024 - 🇩🇪Germany Grevil
Cleaned up the existing code a bit and fixed the module file implementation. Please review!
Note, that by the official meta documentation, "value" doesn't seem to support NULL values, so let's use "0" where we can.
- 🇩🇪Germany Anybody Porta Westfalica
Nice, good enough to fix the issue. Can't be perfect, I think...
- Status changed to RTBC
7 months ago 8:33am 28 June 2024 -
Grevil →
committed e33e2b17 on 2.x authored by
krystalcode →
Issue #3300892: Order/order item price could be NULL
-
Grevil →
committed e33e2b17 on 2.x authored by
krystalcode →
- Status changed to Fixed
7 months ago 8:35am 28 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.