News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Notice: Undefined offset: 0 in currencydisplay.php on line 183

Started by stAn99, October 17, 2018, 14:55:56 PM

Previous topic - Next topic

stAn99

hello friends, when using shopper groups with a logged in customer that has only one shopper group associated on vm3.4.2.dev i am getting this notice (which breaks session when error reporting is enabled):

Notice: Undefined offset: 0 in currencydisplay.php on line 183

the line in currencydisplay is:

$sprgrp = $shopperModel->getShopperGroup($user->shopper_groups[0]);


i suggest to rather use the first one instead of referencing it with zero index:


$first = reset($user->shopper_groups);
$sprgrp = $shopperModel->getShopperGroup($first);


it seems that vmtable optimalization loads IDs as keys which is nice, but all VM needs to be checked agains using
  • index.

    best regards, stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart