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?
Permissive Smarty - Deprecated warning Topic is solved
-
- New Member
- Posts: 6
- Joined: Tue Jun 28, 2016 3:41 am
Re: Permissive Smarty - Deprecated warning
See viewtopic.php?t=84080 for a similar discussion.
Not getting the answer you need? CMSMS support options
-
- New Member
- Posts: 6
- Joined: Tue Jun 28, 2016 3:41 am
Re: Permissive Smarty - Deprecated warning
Thank you, so - configuring PHP error reporting in .htaccess to omit notices will get rid of my error log bloat for now, pending a Dev Team decision on the way ahead.
Re: Permissive Smarty - Deprecated warning
deprecated is a different setting than notice, but yes that's correct. Production sites generally should have those suppressed from logging anyway, just enable them on your dev sites.
Not getting the answer you need? CMSMS support options