woocommerce/includes/abstracts
Nestor Soriano 52eed70f04 Add a 'NumberUtil' class with a 'round' method.
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.

This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
..
abstract-wc-data.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-deprecated-hooks.php Replaced direct access of many constants with the Constants library 2020-01-31 22:18:47 -08:00
abstract-wc-integration.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-log-handler.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-object-query.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-order.php Add a 'NumberUtil' class with a 'round' method. 2020-10-01 11:08:51 +02:00
abstract-wc-payment-gateway.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-payment-token.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-privacy.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-product.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-session.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-settings-api.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-shipping-method.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
abstract-wc-widget.php Fixed package tag usage 2020-08-05 13:36:24 -03:00
class-wc-background-process.php Fixed package tag usage 2020-08-05 13:36:24 -03:00