Fixed
Project:
Commerce Core
Version:
3.x-dev
Component:
Price
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2026 at 22:20 UTC
Updated:
24 Nov 2026 at 12:29 UTC
Jump to comment: Most recent
If you pass a positive integer to Calculator::ceil() the result is incremented by 1
If you pass a negative integer (or zero) to Calculator::floor() the result is decreased by 1
drush ev 'var_dump(\Drupal\commerce_price\Calculator::ceil("5"));'
drush ev 'var_dump(\Drupal\commerce_price\Calculator::floor("-5"));'
drush ev 'var_dump(\Drupal\commerce_price\Calculator::floor("0"));'
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jsacksick commentedComment #7
jsacksick commented