Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Weird warning in Checkout Shipping - Warning: sizeof()


Recommended Posts

Hi all, I have been doing some offline testing of my store (2.3.4.1 CE latest version on XAMP) and just want to confirm that this is a PHP 7.2 error or something else.

I am getting this error  when I go the first page of checkout (checkout_shipping.php) - 

Warning: sizeof(): Parameter must be an array or an object that implements Countable in D:\XAMP\htdocs\response\includes\classes\shipping.php on line 95

I have added the following & ~E_WARNING to includes\application_top .php to suppress the error, but I am wondering what the actual error means and if i should be concerned as to whetehr it will affect the shop when it goes live.

Any suggestions or tips would be great.

 

Cheers!

 

Link to comment
Share on other sites

@nedragdnuos The warning message is indeed related to php7.2 in that you wouldn't have got it on a previous version of php.

However, I think you shouldn't actually hit it if your shipping modules are returning the expected quotes structure.

What shipping modules are you using?

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hmm, speak of the devil, just when I thought all was going well, I am getting this one test shop, but on the other test shop and the live shop it works fine, here is a pic of the error.

 

Now that has me stumped, none of the checkout pages have been modified.

 

shipping.PNG

Link to comment
Share on other sites

Most obvious clue: the price shows $nan (nan = not a number, an error returned by javascript when you try to do an arithmetical operation on a string or empty variable). My guess is that the shipping module is failing to get the quote properly - in the first instance try the module support thread in case someone already hit the error.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...