Claudia M Posted June 28, 2017 Posted June 28, 2017 I just did the upgrade for the All in One Shipping plugin (haven't changed anything) and am getting this error: Anyway to fix this? Thanks in advance! [27-Jun-2017 16:06:53 America/Louisville] PHP Warning: Invalid argument supplied for foreach() in /home/claudias/public_html/modules/shipping/All_In_One_Shipping/shipping.class.php on line 46 Here is the code: $this->_item_count = 0;LINE 46 foreach ($this->_basket['contents'] as $item) { // XXX May want to exclude digital products from the item count, i.e. // if ($item['digital']) continue; $this->_item_count += $item['quantity']; } Quote
keat Posted June 29, 2017 Posted June 29, 2017 (edited) I compared shipping.class.php from 108, 109 and 110 and all files appear identical. Did you clear the cache after updating ? I have something lurking in the depths of my memory, that I've seen this before, but for the life of my don't know why. Edited June 29, 2017 by keat Quote
Claudia M Posted June 29, 2017 Author Posted June 29, 2017 Yes, Keat, I cleared my cache. The plugin is working so maybe it's not a big deal? But a PHP warning - I don't like those. Oh and Keats, thanks for commenting on my post. Claudia Quote
Dirty Butter Posted June 29, 2017 Posted June 29, 2017 Do you have anything digital in your store? Quote
Dirty Butter Posted June 30, 2017 Posted June 30, 2017 I've tested some in the past in the process of trying to help someone, so that might change what my store does. I'll try some tests tomorrow. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.