Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: koyinpyone on October 23, 2019, 02:42:26 PM

Title: Error log on subs.php
Post by: koyinpyone on October 23, 2019, 02:42:26 PM
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:            ),
Title: Re: Error log on subs.php
Post by: Arantor on October 23, 2019, 02:48:15 PM
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.
Title: Re: Error log on subs.php
Post by: 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.
Title: Re: Error log on subs.php
Post by: Arantor on October 23, 2019, 03:25:32 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.
Title: Re: Error log on subs.php
Post by: koyinpyone on October 23, 2019, 03:32:22 PM
Thank you guys . I try to downgrade PHP to 7.0 than error issue solved.

Thanks alots

Title: Re: Error log on subs.php
Post by: Looking on October 23, 2019, 03:36:22 PM
@Arantor, I've used it on sites with mods and custom mods with no issues *shrug*.
Title: Re: Error log on subs.php
Post by: Arantor on October 23, 2019, 03:39:15 PM
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).