motion2082 Posted October 31, 2018 Share Posted October 31, 2018 Hey guys, Updated Prestashop to 1.6.1.22 / PHP 7.1 and now we have an error on our PayPal Payments Pro module. Contacted the developer but still waiting on a response. Will post here with a solution if I find one but if anyone already has one please share your fix. Error Log: [30-Oct-2018 10:37:19 Australia/Sydney] PHP Notice: A non well formed numeric value encountered in /public_html/modules/npaypalpro/ajax.php on line 214 Line 214 is $amountCheck += number_format($item['quantity'] * $item['price'], 2); Which is part of this function function totalAmountCheck($amount, $items) { $amountCheck = $diff = 0; foreach ($items as $item) $amountCheck += number_format($item['quantity'] * $item['price'], 2); if ($amountCheck != $amount) $diff = number_format($amountCheck - $amount, 2); return $diff; } Link to comment Share on other sites More sharing options...
Rolige Posted November 2, 2018 Share Posted November 2, 2018 Try changing the line 214 for this one: $amountCheck += number_format((int)$item['quantity'] * (float)$item['price'], 2); And let me know. Regards! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now