http://php.net/manual/en/function.create-function.php
create_function — Create an anonymous (lambda-style) function
Warning
This function has been DEPRECATED as of PHP 7.2.0. Relying on this function is highly discouraged.
So, some mods uses create_function() in their install.xml or source code.
Is there any recommendations for migration to valid code?
PHP 7.2.x is not supported by SMF 2.0.x at this time.
The only migration is to sit and rewrite every single bbcode mod (plus any others that used it).
All of the base ones in 2.1 are done but migrating this for 2.0 is borderline impossible to get right in a fixes-everything way.
Can I migrate from 2.0.15 to 2.1+ without problems?
Well, 2.1 isn't ready yet. When it is, you will still need to get your theme updated (since 2.0 themes aren't compatible with 2.1), bbcode mods will definitely need updating, other mods may need updates too.
The fewer mods and changes you have, the better the upgrade possibility.
This causes my smf_log_errors table to grow incredibly fast. It was bigger than the actual forum board/topics and now I have to create a stored proceedure and an event to truncate that table once every day. Otherwise, mysql ends up filling memory with this nonsense. I am worried about the hit it takes on IO. The error log grew to 1GB in a couple of days.
Can I re-write the Subs.php file where the error seems to orgininate so that it doesn't use create_function(), but rather an anonymous function? Has anyone done this?
Yes you can for default SMF mod at https://www.smfhacks.com/index.php?action=downloads;sa=view;id=215 that does most of it.
Any one using cPanel for web site management, he may use MultiPHP manager module and select PHP 5.6 as default PHP engine.
By using SMF2.0.X-enablePHP7.2Compat_v1.3, this masked the problem but when tried to uninstall old mod which was still delivering errors, my forum crashed ( white index ).
I was had to restore files backup and database backup, then switched to PHP 5.6, and now I am back in the world of livings.
Old backup this deactivated SMF2.0.X-enablePHP7.2Compat_v1.3 and forum functionality this is now restored.
Error log clear, no issues at all.
You can always choose PHP 7.1, it's still supported (till the end of this year, I think ???).
@vbgamer45. Thank you, it worked like a charm.
Quote from: vbgamer45 on April 14, 2019, 01:48:39 PM
Yes you can for default SMF mod at https://www.smfhacks.com/index.php?action=downloads;sa=view;id=215 that does most of it.
Thank you very very much.