CMS MADE SIMPLE FORGE

PaypalGateway

 

[#4319] Wrong parameter count for number_format()

avatar
Created By: Sofia Hauschildt (sonya)
Date Submitted: Thu Nov 19 13:28:53 -0500 2009

Assigned To:
Version: 2.1.4
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
Wrong parameter count for number_format()
Detailed Description:
Trying to checkout with PayPal:

Warning: Wrong parameter count for number_format() in
/var/www/xxx/modules/PaypalGateway/PaypalGateway.module.php on line 660

string number_format  ( float $number  , int $decimals  , string $dec_point  ,
string $thousands_sep  )

You have omitted the second parameter. E. g.:

$parms['amount_'.$count] = number_format($amount,  '.','');

should be

$parms['amount_'.$count] = number_format($amount, 2, '.','');

Tested on production install, works.


History

Comments
avatar
Date: 2009-11-22 21:45
Posted By: Luke van de Paverd (Lukevdp)

I can second this
      
avatar
Date: 2009-12-03 18:06
Posted By: Michael Erder (merder99)

While this fixed the error message it stopped sending the order value to PayPal.

i change the code to the following and it worked again for me

$parms['amount_'.$count] = number_format($data['amount'], 2, '.','');