News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Error log on subs.php

Started by koyinpyone, October 23, 2019, 02:42:26 PM

Previous topic - Next topic

koyinpyone

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:            ),

Arantor

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.

Looking

There is a Github patch that can assist with this so you do not have to downgrade PHP.

Arantor

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.

koyinpyone

Thank you guys . I try to downgrade PHP to 7.0 than error issue solved.

Thanks alots


Looking

@Arantor, I've used it on sites with mods and custom mods with no issues *shrug*.

Arantor

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).

Advertisement: