Replies: 0
Sometimes our debug.log shows a FATAL error.
Version 1.6.1 is installed.
But anyway the payment seemed to work.
[09-Nov-2021 19:12:37 UTC] PHP Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, null given in /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php:320
Stack trace:
#0 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(320): round(NULL, 2)
#1 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php(267): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->ditch_items_when_mismatch(Object(WooCommerce\PayPalCommerce\ApiClient\Entity\Amount))
#2 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(222): WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit->to_array()
#3 [internal function]: WooCommerce\PayPalCommerce\ApiClient\Entity\Order::WooCommerce\PayPalCommerce\ApiClient\Entity\{closure}(Object(WooCommerce\PayPalCommerce\ApiClient\Entity\PurchaseUnit))
#4 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-order.php(224): array_map(Object(Closure), Array)
#5 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php(438): WooCommerce\PayPalCommerce\ApiClient\Entity\Order->to_array()
#6 /home/www/xxx/wp-includes/class-wp-hook.php(303): WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint->WooCommerce\PayPalCommerce\Button\Endpoint\{closure}(Array, Object(WP_Error))
#7 /home/www/xxx/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#8 /home/www/xxx/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#9 /home/www/xxx/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(887): do_action('woocommerce_aft...', Array, Object(WP_Error))
#10 /home/www/xxx/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1161): WC_Checkout->validate_checkout(Array, Object(WP_Error))
#11 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php(447): WC_Checkout->process_checkout()
#12 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/class-createorderendpoint.php(190): WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint->process_checkout_form_when_creating_account(Array, NULL)
#13 /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/class-buttonmodule.php(150): WooCommerce\PayPalCommerce\Button\Endpoint\CreateOrderEndpoint->handle_request()
#14 /home/www/xxx/wp-includes/class-wp-hook.php(303): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}('')
#15 /home/www/xxx/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#16 /home/www/xxx/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#17 /home/www/xxx/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action('wc_ajax_ppc-cre...')
#18 /home/www/xxx/wp-includes/class-wp-hook.php(303): WC_AJAX::do_wc_ajax('')
#19 /home/www/xxx/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(false, Array)
#20 /home/www/xxx/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#21 /home/www/xxx/wp-includes/template-loader.php(13): do_action('template_redire...')
#22 /home/www/xxx/wp-blog-header.php(19): require_once('/home/www/xxx...')
#23 /home/www/xxx/index.php(17): require('/home/www/xxx...')
#24 {main}
thrown in /home/www/xxx/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Entity/class-purchaseunit.php on line 320