Permissive Smarty - Deprecated warning
Posted: Sat Jun 15, 2024 5:18 am
I use Permissive Smarty to include PHP functions in some page templates and also some Gallery templates. It is now putting entries like this in the error log, for example when I use getimagesize() to stop PageSpeed complaining about missing width & height in img tags:
[02-Jun-2024 15:45:50 Australia/Sydney] PHP Deprecated: Using unregistered function "getimagesize" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/lorikeet/public_html/avaloncraftcottage.com.au/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 651
Obviously nothing is actually broken yet. But it does clutter up the error logs, so that I have to regularly clear them. I have attempted to use registerPlugin to fix the problem but I haven't been able to get the syntax right. Does anyone know?
[02-Jun-2024 15:45:50 Australia/Sydney] PHP Deprecated: Using unregistered function "getimagesize" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/lorikeet/public_html/avaloncraftcottage.com.au/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 651
Obviously nothing is actually broken yet. But it does clutter up the error logs, so that I have to regularly clear them. I have attempted to use registerPlugin to fix the problem but I haven't been able to get the syntax right. Does anyone know?