Jump to content

Undefined Offset 'error' from PaymentModule.php (ps1.6.1.10)


darvidc

Recommended Posts

Hi,

 

I'm running PS1.6.1.10 (after updating recently from PS1.6.1.8) and during some payments I'm getting the following entries in the php error.log?

 

[06-Jan-2017 13:54:23 Europe/Stockholm] PHP Notice:  Undefined offset: 62345 in /var/www/html/ps16/classes/PaymentModule.php on line 233
[06-Jan-2017 13:54:23 Europe/Stockholm] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/ps16/classes/PaymentModule.php on line 233
 
If I then look at my "PaymentModule.php" (not Overridden in any way) it seems to be something to do with delivery and carrier data! See below Line 233 in red:
 
            foreach ($cart_delivery_option as $id_address => $key_carriers) {
                foreach ($delivery_option_list[$id_address][$key_carriers]['carrier_list'] as $id_carrier => $data) {
                    foreach ($data['package_list'] as $id_package) {
                        // Rewrite the id_warehouse
                        $package_list[$id_address][$id_package]['id_warehouse'] = (int)$this->context->cart->getPackageIdWarehouse($package_list[$id_address][$id_package], (int)$id_carrier);
                        $package_list[$id_address][$id_package]['id_carrier'] = $id_carrier;
                    }
                }
            }

 

Has anybody got any idea about this problem and how to fix it, please?

 

Thanks, In Advance

David C

Link to comment
Share on other sites

Thanks, but I'm running "Live" and I don't know how to do a debug without affecting the shop?

 

I've know turned off the "FS Cache" and the above error and a couple of others seemed to have disappeared from the php "error.log". (I have one remaining error

"PHP Notice:  Trying to get property of non-object in /var/www/html/ps16/classes/module/Module.php on line 2284"

which seems to have something to do with currencies, which if I can't sort it out today, I'll start a new thread for.

 

I can't see any performance difference after turning off the FS Cache (I don't know how to check that either, if I could) but which of the other Cache methods would be recommended to try on my single Debian VPS?

Link to comment
Share on other sites

Thanks, but I'm running "Live" and I don't know how to do a debug without affecting the shop?

 

create a test shop and debug there

 

I can't see any performance difference after turning off the FS Cache (I don't know how to check that either, if I could) but which of the other Cache methods would be recommended to try on my single Debian VPS?

 

Any reason you believe one is needed?  if you use mysql query cache, you might not even need a cache.  you just have to test and see which has the best performance without being defective

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...