Jump to content

Google Analytics v2.3.4 - in PrestaShop 1.7.1.1PayPal Payments Pro (A non well formed numeric value encountered)


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...