Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: koyinpyone - lokakuu 23, 2019, 02:42:26 IP

Otsikko: Error log on subs.php
Kirjoitti: koyinpyone - lokakuu 23, 2019, 02:42:26 IP
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:            ),
Otsikko: Re: Error log on subs.php
Kirjoitti: Arantor - lokakuu 23, 2019, 02:48:15 IP
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.
Otsikko: Re: Error log on subs.php
Kirjoitti: Looking - lokakuu 23, 2019, 03:12:54 IP
There is a Github patch that can assist with this so you do not have to downgrade PHP.
Otsikko: Re: Error log on subs.php
Kirjoitti: Arantor - lokakuu 23, 2019, 03:25:32 IP
Lainaus käyttäjältä: Looking - lokakuu 23, 2019, 03:12:54 IP
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.
Otsikko: Re: Error log on subs.php
Kirjoitti: koyinpyone - lokakuu 23, 2019, 03:32:22 IP
Thank you guys . I try to downgrade PHP to 7.0 than error issue solved.

Thanks alots

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