News:

Wondering if this will always be free?  See why free is better.

Main Menu

Sources/Subs-SCMP.php on line 99

Started by Methodh2k, August 28, 2023, 10:04:24 AM

Previous topic - Next topic

Methodh2k

can anybody help me fix this error ?



Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /home/n5hsase7qwo9/public_html/Sources/Subs-SCMP.php:99 Stack trace: #0 /home/n5hsase7qwo9/public_html/Sources/Subs-SCMP.php(99): implode() #1 /home/n5hsase7qwo9/public_html/Sources/Subs.php(5789): SCM_Load() #2 /home/n5hsase7qwo9/public_html/Sources/Load.php(2695): call_integration_hook() #3 /home/n5hsase7qwo9/public_html/index.php(234): loadTheme() #4 /home/n5hsase7qwo9/public_html/index.php(191): smf_main() #5 {main} thrown in /home/n5hsase7qwo9/public_html/Sources/Subs-SCMP.php on line 99 :-\

Kindred

that file is not a core SMF file --   so it's related to some mod -- and is probably due to a mod which is not updated to work with php 8.?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

Attach the file probably old code what mod?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Methodh2k

what can you recommend me do to get it working again

Methodh2k

do you thing removing that line will fix it

Doug Heffernan

Quote from: Methodh2k on August 28, 2023, 01:10:10 PMdo you thing removing that line will fix it

It's hard to say without seeing the file in question.

Kindred

you can not just remove lines of code....    that will just break things worse.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

live627

Quote from: Methodh2k on August 28, 2023, 01:10:10 PMdo you thing removing that line will fix it
No. That will only net you another error. The arguments may need flipped. Attach the file or post the code.

-Rock Lee-

¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

live627

diff --git a/Subs-SCMP.php b/Subs-SCMP.php
index cb38e8d..585dbf1 100644
--- a/Subs-SCMP.php
+++ b/Subs-SCMP.php
@@ -96,7 +96,7 @@ function SCM_Load()
  $echo = array();
  foreach ($context['SCMP_playlists'][$selected]['songs'] as $title => $url)
  $echo[$title] = '{\'title\':' . JavaScriptEscape($title) . ',\'url\':' . JavaScriptEscape($url) . '}';
- $playlist = implode($echo, ',');
+ $playlist = implode(',', $echo);
 
  // Decide on the CSS for the player:
  if (!$enabled || empty($playlist))
https://github.com/live627/SCM_Music_Player_for_SMF/commit/4e13936671e1111025e7b80b72c60bbd67312301

Advertisement: