Page 1 of 1

Division by zero in currency.php on line 141 (Despite Patch)

Posted: Tue Mar 13, 2018 3:58 pm
by amcc
So after a clean install of OC 3.0.2.0, I keep getting the 'Division by zero in currency.php on line 141' error persistently despite applying the Yahoo currency patch and following documentation (clearing cache etc):

Code: Select all

https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=32694
I've also tried removed any additional currencies but with no success as the error continues. Somewhat surprised Opencart have not been bothered addressing this as I've noticed this has been a problem for users since December 2017.

Copied the error below

Code: Select all

Warning: Division by zero in /home/user/public_html/test/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/user/public_html/test/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/user/public_html/test/admin/model/localisation/currency.php
Any help would be much appreciated, thanks!

Re: Division by zero in currency.php on line 141 (Despite Patch)

Posted: Tue Mar 13, 2018 4:40 pm
by Wid
after you install the extention you get this error too?
line 141 is no longer in use if you install the extention you mentioned.

give the spesific line of the file from ..system/storage/modification/admin/model/localisation/currency.php

Re: Division by zero in currency.php on line 141 (Despite Patch)

Posted: Tue May 15, 2018 7:07 pm
by JoeriV
Same problem with a fresh install of OC 3.0.2.0
I have browsed the forum and found some patches for older versions, but not for the latest.
How come this problem keeps popping up, even after several years and several versions?

Re: Division by zero in currency.php on line 141 (Despite Patch)

Posted: Sun Sep 30, 2018 7:49 am
by faizanyaseen
JoeriV wrote:
Tue May 15, 2018 7:07 pm
Same problem with a fresh install of OC 3.0.2.0
I have browsed the forum and found some patches for older versions, but not for the latest.
How come this problem keeps popping up, even after several years and several versions?
/home/user/domian.com/storage/modification/admin/model/localisation/currency.php
on line 141
if ((float)$value < 1 && isset($line[$i + 1])) {
//$value = (1 / utf8_substr($line[$i + 1], 11, 6));
}