ohno Posted May 27, 2020 Share Posted May 27, 2020 Not sure how to find what is causing my issue here, I'm running smarty which gives me this error if I switch PHP version to 7.4 (was on 7.3) : - Quote ERRNO: 8 TEXT: Trying to access array offset on value of type null LOCATION: /home/mywebsite/public_html/smarty_templates_c/6c6d4758b747deced9729a6e51ecf350702d314f_0.file.cart.tpl.php, line 365, at May 27, 2020, 11:32 am Showing backtrace: content_5ecd2ac2aa0d30_10801785(Object:Smarty_Internal_Template) # line 123, file: /home/mywebsite/public_html/include/smarty/sysplugins/smarty_template_resource_base.php Smarty_Template_Resource_Base.getRenderedTemplateCode(Object:Smarty_Internal_Template) # line 114, file: /home/mywebsite/public_html/include/smarty/sysplugins/smarty_template_compiled.php Smarty_Template_Compiled.render(Object:Smarty_Internal_Template) # line 216, file: /home/mywebsite/public_html/include/smarty/sysplugins/smarty_internal_template.php Smarty_Internal_Template.render(false, "1") # line 232, file: /home/mywebsite/public_html/include/smarty/sysplugins/smarty_internal_templatebase.php Smarty_Internal_TemplateBase._execute(Object:Smarty_Internal_Template, null, null, null, "1") # line 134, file: /home/mywebsite/public_html/include/smarty/sysplugins/smarty_internal_templatebase.php Smarty_Internal_TemplateBase.display("pages/cart.tpl") # line 106, file: /home/mywebsite/public_html/cart/index.php The line the error refers to is this : - <p class="cart_del_info_box_text"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="cart_del_info_box_message"><?php echo $_smarty_tpl->tpl_vars['cart']->value->mDelivery['cartdeliverymessage'];?> How do I go about finding which file has the actual problem? Thanks for any pointers. Quote Link to comment Share on other sites More sharing options...
kicken Posted May 27, 2020 Share Posted May 27, 2020 The issue is that either tpl_vars is null or mDelivery is null. Check that when using that template you're defining the cart variable. Check that it's mDelivery property is is an array. Quote Link to comment Share on other sites More sharing options...
ohno Posted May 28, 2020 Author Share Posted May 28, 2020 Thanks, fixed that issue now the payment page has a whole load of similar errors! <input <?php if (isset($_smarty_tpl->tpl_vars['cart']->value->mErrors['BillingFirstName'])) {?>class="error"<?php }?> type="text" name="BillingFirstName" tabindex="8" maxlength="25" value="<?php echo $_smarty_tpl->tpl_vars['cart']->value->mVars['BillingFirstName'];?> Stuck on this one TBH! Quote Link to comment Share on other sites More sharing options...
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.