Post by Evilonion » Mon Aug 17, 2020 5:06 pm

Hi, I have done a search but it gets quite confusing as there are so many replies for previous versions of opencart as well as issues people have with modules.

Im running the latest opencart 3.0.3.6 with php version 7.4
Its a completely clean install and i get the following error log:

Warning: A non-numeric value encountered in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: A non-numeric value encountered in

I had this issue many opencart versions ago using oc2 and then again at some point using oc3 but now it seems the bug is still here?
Any ideas how i resolve this issue as the error logs are huge within a matter of days.

The links i find when searching are all regarding modules and conflicts, this is a completely clean unmodded install.

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by khnaz35 » Mon Aug 17, 2020 5:11 pm

Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
Warning: A non-numeric value encountered in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: A non-numeric value encountered in
And what is on line 141?
Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
I had this issue many opencart versions ago using oc2 and then again at some point using oc3 but now it seems the bug is still here?
Oc2 and OC3 are different versions. Can't simply compare then because of numbers like 3 comes after 2.
you can comprare both versions files to understand more.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by by mona » Mon Aug 17, 2020 5:12 pm

have you turned off the auto currency update in settings?

viewtopic.php?f=141&t=219450

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Evilonion » Mon Aug 17, 2020 6:32 pm

khnaz35 wrote:
Mon Aug 17, 2020 5:11 pm
Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
Warning: A non-numeric value encountered in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: A non-numeric value encountered in
And what is on line 141?
Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
I had this issue many opencart versions ago using oc2 and then again at some point using oc3 but now it seems the bug is still here?
Oc2 and OC3 are different versions. Can't simply compare then because of numbers like 3 comes after 2.
you can comprare both versions files to understand more.

Its an issue that seems to have never been resolved throughout all the opencart releases

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by Evilonion » Mon Aug 17, 2020 6:35 pm

by mona wrote:
Mon Aug 17, 2020 5:12 pm
have you turned off the auto currency update in settings?

viewtopic.php?f=141&t=219450
I have yes,
Also set main currency and deleted euro and usd

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by Evilonion » Mon Aug 17, 2020 6:37 pm

khnaz35 wrote:
Mon Aug 17, 2020 5:11 pm
Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
Warning: A non-numeric value encountered in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: A non-numeric value encountered in
And what is on line 141?

Code: Select all

	if ((float)$value < 1 && isset($line[$i + 1])) {
				$value = (1 / utf8_substr($line[$i + 1], 11, 6));
			}	

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by by mona » Mon Aug 17, 2020 6:43 pm

No it has not been updated since Yahoo stopped support.

You can try this, but it is not updated for the new Oc’s so no idea if it will work.
From your answer you know OC, so you can try and remove if it doesn’t work.
https://www.opencart.com/index.php?rout ... n_id=32694

Please let us know if it works for you .. thanks

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by khnaz35 » Mon Aug 17, 2020 6:48 pm

by mona wrote:
Mon Aug 17, 2020 6:43 pm
No it has not been updated since Yahoo stopped support.

You can try this, but it is not updated for the new Oc’s so no idea if it will work.
From your answer you know OC, so you can try and remove if it doesn’t work.
https://www.opencart.com/index.php?rout ... n_id=32694

Please let us know if it works for you .. thanks
This extension worked for me on OC 2.3.0.2, and OC 3.0.1.1
but not sure will be work for him since he is on 3.0.3.6

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by khnaz35 » Mon Aug 17, 2020 6:50 pm

Evilonion wrote:
Mon Aug 17, 2020 6:37 pm
khnaz35 wrote:
Mon Aug 17, 2020 5:11 pm
Evilonion wrote:
Mon Aug 17, 2020 5:06 pm
Warning: A non-numeric value encountered in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: Division by zero in /home/atspeedracingco/public_html/onlineshop/admin/model/localisation/currency.php on line 141Warning: A non-numeric value encountered in
And what is on line 141?

Code: Select all

	if ((float)$value < 1 && isset($line[$i + 1])) {
				$value = (1 / utf8_substr($line[$i + 1], 11, 6));
			}	
The line is already have code for adding numeric value strange.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by by mona » Mon Aug 17, 2020 6:52 pm

yes I know - that is why I asked for him to tell us if it works ..

BTW - You did check the links in the above post because one user found with the exact same set up as you he lowered the php version ?
No I can not find it .. but it is in there somewhere ..

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by khnaz35 » Mon Aug 17, 2020 7:02 pm

I had tested on PHP Version 7.3.21 and was no issue.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by Evilonion » Mon Aug 17, 2020 7:05 pm

I'm assuming with the other currencies deleted and the default set to 1 that it should not throw the error up again unless i hit refresh currency.
As long as i keep it at 1 and do not touch anything it does not throw an error up.

I don't understand why opencart is even keeping the multi currency option if it is not even supported anymore.

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by by mona » Mon Aug 17, 2020 7:08 pm

Evilonion wrote:
Mon Aug 17, 2020 7:05 pm
I'm assuming with the other currencies deleted and the default set to 1 that it should not throw the error up again unless i hit refresh currency.
As long as i keep it at 1 and do not touch anything it does not throw an error up.

I don't understand why opencart is even keeping the multi currency option if it is not even supported anymore.
auto multi currency
You and me both :)

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 101 guests