Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: planet9 on February 04, 2021, 09:27:41 AM

Title: 2.0.18 and php8
Post by: planet9 on February 04, 2021, 09:27:41 AM
I am testing 2.0.18 on ubuntu 20.04 and php8 and it is looking fairly good. So far I came across some instances of "create_function" replacements that were missed.

I have 3 files that I've updated. I haven't submitted anything to the SMF github repo before.. is that the desired method to propose fixes?

For example:

Sources/Profile_Modify.php

Lines 183-186 should be replace with:

'input_validate' => function(&$value)
{
$value = $value != '' ? strtr($value, array(',' => '', '.' => '', ' ' => '')) : 0;
return true;
},
Title: Re: 2.0.18 and php8
Post by: vbgamer45 on February 04, 2021, 10:27:31 AM
There should not be able create_function with the SMF 2.0.18 package. Unless the install failed to modify in some places or if modifications to SMF used create_function in their coding.

2.0.x is not on github to the public. You would open a request in the bug reports forum.
Title: Re: 2.0.18 and php8
Post by: Kindred on February 04, 2021, 10:37:44 AM
all of the instances that I found were due to older mods
Title: Re: 2.0.18 and php8
Post by: planet9 on February 04, 2021, 10:50:18 AM
Quote from: Kindred on February 04, 2021, 10:37:44 AM
all of the instances that I found were due to older mods

Good point.. thanks. I checked the SMF source and found no uses of create_function.

Though I suppose this topic might help others who want to move to php8 and have mods that are not updated yet.
Title: Re: 2.0.18 and php8
Post by: vbgamer45 on February 04, 2021, 10:55:33 AM
I would post in any of mods topics here to let the mod authors to post an update.
Title: Re: 2.0.18 and php8
Post by: planet9 on February 04, 2021, 12:08:25 PM
Quote from: vbgamer45 on February 04, 2021, 10:55:33 AM
I would post in any of mods topics here to let the mod authors to post an update.

Good idea.. thanks!
Title: Re: 2.0.18 and php8
Post by: Pogo Stick on February 10, 2021, 06:20:22 AM
Sorry to hijack the thread, but just wondering if 2.0.18 is working OK with PHP if you're not using any mods?
Title: Re: 2.0.18 and php8
Post by: Pogo Stick on February 10, 2021, 08:03:45 AM
Quote from: Pogo Stick on February 10, 2021, 06:20:22 AM
Sorry to hijack the thread, but just wondering if 2.0.18 is working OK with PHP if you're not using any mods?

I mean PHP 8.

8)
Title: Re: 2.0.18 and php8
Post by: vbgamer45 on February 10, 2021, 09:23:48 AM
It should work but not officially supported as of yet.