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.
Problem/Motivation
If tax amount is 0 in the method ::calculateTaxAmount we can end up calling bcdiv with 0, which gives us these nice things:
bcdiv(): Division by zero Calculator.php:96
So let's avoid doing that?
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 3319436.patch | 702 bytes | eiriksm |
Comments
Comment #2
eiriksmd.o is having some gitlab problems, so here is a good ol patch
This issue should be possible to write a test for as well, but I do not have that time atm
Comment #5
jsacksick CreditAttribution: jsacksick at Centarro commentedPatch looks good, thanks!