0

I am receiving a number of PHP Notice: Undefined offset: 15 error in my apache2 error log.

I beleive that the error relates to the below PHP code, does anyone have any suggestions on how to correct this? I have seen other suggestions to use isset?

{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBSHARES[shares].account|lower}{assign var=listed value=1}<tr class="success">{/if} {else}<tr>{/if}

I'm using smarty template so the above code gets converted to:-

<?php if (mb_strtolower((($tmp = @$_smarty_tpl->tpl_vars['GLOBAL']->value['userdata']['username'])===null||$tmp==='' ? '' : $tmp), 'UTF-8')==mb_strtolower($_smarty_tpl->tpl_vars['CONTRIBSHARES']->value[$_smarty_tpl->getVariable('smarty')->value['section']['shares']['index']]['account'], 'UTF-8')) {?><?php $_smarty_tpl->tpl_vars['listed'] = new Smarty_variable(1, null, 0);?><tr class="success"><?php }?> <?php } else { ?><tr><?php }?>

Any suggestions on how to construct would be greatly appreciated.

daygle
  • 61
  • 7

0 Answers0