Board index doesn't load

Started by Sir Osis of Liver, April 05, 2023, 09:08:15 PM

Previous topic - Next topic

Sir Osis of Liver

2.0.19 running in php 7.4 was working ok few minutes ago.  Owner just upgraded to 8.0.28, board index doesn't load with this error -


implode(): Argument #2 ($array) must be of type ?array, string given


Could be a mod?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Diego Andrés

Is there a file or something else to identify it?

SMF Tricks - Free & Premium Responsive Themes for SMF.

Sir Osis of Liver

He's downgraded to php 7.4, forum up and running.  No file reference for that error -


http://kotct2017.knightsofthecointable.com/index.php?http://kotct2017.knightsofthecointable.com/
implode(): Argument #2 ($array) must be of type ?array, string given


Now he's getting a ton of errors from classifieds mods -


http://kotct2017.knightsofthecointable.com/index.php?
8192: implode(): Passing glue string after array is deprecated. Swap the parameters
File: /home/u0fgcfwp0drf/public_html/kotct2017/Sources/classifieds2.php
Line: 8731


Lot of old stuff on this forum.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

That later error actually solves the mystery, it's warning that if you upgrade php that function will stop working as it is, and then the first error will happen.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

So both errors are from Classifieds?  That should be fixable, it's one of vbgamer's mods and has been updated to 2.1.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

The error on line 8731 is an implode function with two parameters the wrong way around - which is why you're being told that it's deprecated, because it was deprecated a while ago. And deprecation means that at some point the 'you're doing this wrong' warning becomes 'you're doing this wrong, stop it' with a hard stop.

There's a reasonable chance that fixing the error on line 8731 will fix all the issues - because the two errors superficially could be the same actual error, just going from being a 'stop this' warning in PHP 7.4 to a 'stop fatally' error in PHP 8.

It's not enough that the mod is updated for SMF 2.1 - it has to be updated for the underlying language if it's being done wrong. Historically PHP used to allow leeway for doing things incorrectly, but in newer versions it's actually enforcing they be correct.

Sir Osis of Liver

Owner is purchasing current version, will see if it works in php 8.0 when I get it.  We're currently in 7.4, GoDaddy had him running in 5.6. :P

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

So 5.6 didn't care about this and just did 'whatever' (even though it was in the manual even further back to permit it though it was officially not encouraged), 7.4 doesn't like it and tells you so, 8.0 is like 'nope'.

Advertisement: