Post by srdjank » Thu Apr 15, 2021 9:18 pm

Hello,

I'm running OpenCart 2.3.0.2 and get the following error message at the top of the page when clicking on Shipping List for any order:

Warning: A non-numeric value encountered in /home1/*****/public_html/admin-chorus/controller/sale/order.php on line 1975 (user folder starred out for privacy)

On some orders, the message repeats 3-4 times. On others, it just appears once.

Looking into the code, on line 1975 is:

'{zone}',

Out of:

$find = array(

'{firstname}',

'{lastname}',

'{company}',

'{address_1}',

'{address_2}',

'{city}',

'{postcode}',

'{zone}',

'{zone_code}',

'{country}'

);

So I'm wondering why "zone" is expecting a numeric value? Shouldn't it be alphabetic? Or how do I fix it so the error message no longer appears?

Thanks in advance!

Newbie

Posts

Joined
Wed Mar 24, 2021 1:57 am

Post by straightlight » Thu Apr 15, 2021 10:06 pm

I believe this issue was addressed before as it was already fixed on more recent OC versions.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by srdjank » Thu Apr 15, 2021 10:33 pm

Thanks for the quick reply. So is the only solution to upgrade the installation, or is there an easier fix? Just asking because there are quite a few extensions and themes installed.

Thanks for your help!

Newbie

Posts

Joined
Wed Mar 24, 2021 1:57 am

Post by straightlight » Thu Apr 15, 2021 10:42 pm

The quickest way would be to compare the same file controller with the maintenance branch: https://github.com/opencart/opencart/bl ... /order.php or with a recent OC version.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Thu Apr 15, 2021 11:28 pm

srdjank wrote:
Thu Apr 15, 2021 10:33 pm
Thanks for the quick reply. So is the only solution to upgrade the installation, or is there an easier fix? Just asking because there are quite a few extensions and themes installed.

Thanks for your help!
https://github.com/opencart/opencart/pull/8223/files

Try changing

Code: Select all

$option_weight = '';
to

Code: Select all

$option_weight = 0;
.

If you are seeing the error on a page and not just in your logs then you also need make sure display errors is switch off (in all three places).

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 189 guests