I would like to disable smarty-s notices.
Notice: Undefined variable: xy
Because I know that some variables are undefined and in some cases I don’t even want to define them.
BUT I don’t want to disable other PHP notices.
Thanks for help!
You should use this: http://www.smarty.net/docs/en/variable.error.reporting.tpl
$smarty->error_reporting = E_ALL & ~E_NOTICE;
You should make your checks on the variables and make sure they are defined and set before using. Removing the Notices and Warnings enhance the performance of your application.
When your application or website is published you should add the following condition to avoid errors from appearing to your customers:
error_reporting(E_ERROR || E_WARNING);
Only warning and Errors will appear.