my new installed SMF forum got lots of errors like " 8192: Function create_function() is deprecated " on Sources/Subs.php.
please advise me how to solve. error like that
1210: array(
1211: 'tag' => 'ftp',
1212: 'type' => 'unparsed_content',
1213: 'content' => '<a href="$1" class="bbc_ftp new_win" target="_blank">$1</a>',
==>1214: 'validate' => create_function('&$tag, &$data, $disabled', '
1215: $data = strtr($data, array(\'<br />\' => \'\'));
1216: if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0)
1217: $data = \'ftp://\' . $data;
1218: '),
1219: ),
You need to set your hosting to PHP 7.1 or lower, you're using 7.2 or 7.3 which doesn't work properly with SMF 2.0.15 - the next version will fix this.
There is a Github patch that can assist with this so you do not have to downgrade PHP.
Quote from: Looking on October 23, 2019, 03:12:54 PM
There is a Github patch that can assist with this so you do not have to downgrade PHP.
It relies on having no mods, though. Better to wait for 2.0.16 than apply patches like that.
Thank you guys . I try to downgrade PHP to 7.0 than error issue solved.
Thanks alots
@Arantor, I've used it on sites with mods and custom mods with no issues *shrug*.
Sure, you know better than me about what's changed in 7.2 and what mods are affected and exactly how it will be affected (or prevent 2.0.16 being installed, for that matter).