Post by kelv » Fri Nov 11, 2011 5:50 pm

Fatal error: Unsupported operand types in D:\www\opencart\system\library\currency.php on line 69

I got this error if I added special prices to some products. Without the specials, I did not have this problem.

I am using version 1.5.1

I didn't touch any of the currency settings, and I really have no idea about what's causing this problem. But this problem is gone after I changed line 69 from:

Code: Select all

$value = $number * $value;
to:

Code: Select all

$value = (float)$number * $value;
I am not sure this change will have any side affect or not. And I really want to know the root cause to this problem, and the way to properly fix this. if this is a bug, hope it will be fixed in the future release.

Thanks

Newbie

Posts

Joined
Fri Nov 11, 2011 5:36 pm

Post by wernerrenrew » Fri Nov 11, 2011 6:37 pm

Hi,

So what you are telling us is that you manually inserted data into your database.
Ifso the best thing you could do is go to your table and change this, to this . to prevent any future problem with fetching from the database.

Regards Werner

User avatar
Active Member

Posts

Joined
Thu Oct 27, 2011 9:48 pm
Location - Netherlands

Post by Daniel » Fri Nov 11, 2011 10:32 pm

added. to svn.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by wernerrenrew » Fri Nov 11, 2011 10:55 pm

Ah my bad didn't read and also didn't check the database on the type.
Go Daniel go ;D

User avatar
Active Member

Posts

Joined
Thu Oct 27, 2011 9:48 pm
Location - Netherlands
Who is online

Users browsing this forum: No registered users and 10 guests