问题
PrestaShop 1.6.1.10
PHP 5.5.7
When I turn on debugging in PrestaShop, appear as errors like this, I would fix it, but I do not understand how to fix it.
Notice: Undefined index: br in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 34 Notice: Undefined index: hookPaymentShow in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 44 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 44 Notice: Undefined index: manifestPDFFooter in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 52 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 52 Notice: Undefined index: desc in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 54 Notice: Trying to get property of non-object in public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 54
回答1:
It means somewhere in a tpl there is a call to hookPaymentShow (for example) in an array that is not defined (doesn't exist).
Try to find the location where the notice is thrown, and you can delete the entry or use something like {if isset($array['variable'])}$array['variable']{/if}
来源:https://stackoverflow.com/questions/42388225/prestashop-with-smarty-internal-templatebase