News:

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

Main Menu

Array to string conversion error

Started by Blade~, October 02, 2022, 03:02:28 PM

Previous topic - Next topic

Blade~

I had to reinstall the entire forum (2.1.2) except the databases and getting this 'Array to string conversion error', but many of them. I did some search and sounds like a mod might be causing it, the only mod I have installed at this point is SMFPacks Ads Manager 1.3.3 which claims to be compatible with 2.1.2. Anyone else had this problem, how can it be resolved? Below is one of the backtrace outputs, the only thing changes with every error is the URL page that's causing the error. Thank you!

------------------------------------------------------
Error message
8: Array to string conversion
File
/home2/../Sources/Security.php
Line
924
URL of page causing the error
https://../index.php?action=profile;u=278
Backtrace information
#0: smf_error_handler()
Called from unknown on line -1
#1: array_intersect()
Called from /home2/../Sources/Security.php on line 924
#2: allowedTo()
Called from /home2/../Sources/Subs-Menu.php on line 105
#3: createMenu()
Called from /home2/../Sources/Profile.php on line 535
#4: ModifyProfile()
Called from /home2/../index.php on line 191
'Do nothing and there is nothing that's not done' - Lao Tzu

Running SMF 2.1.2
PHP version: 7.3.33

Doug Heffernan

Quote from: Blade~ on October 02, 2022, 03:02:28 PMI had to reinstall the entire forum (2.1.2) except the databases

What does that mean? Can you give us a step by step account of this?

Blade~

I installed a theme that ended up ruining the entire forum, tried fixing it was gone too far, deleted the forum folder but not the database, did a full reinstall, connected to the existing database, it was working again. Unfortunately also reinstalled the Ad Management mod right away so not sure if the array string conversion error existed before that, but it is the only mod that was reinstalled.
'Do nothing and there is nothing that's not done' - Lao Tzu

Running SMF 2.1.2
PHP version: 7.3.33

Doug Heffernan

Quote from: Blade~ on October 02, 2022, 05:38:07 PMI installed a theme that ended up ruining the entire forum, tried fixing it was gone too far, deleted the forum folder but not the database, did a full reinstall, connected to the existing database, it was working again. Unfortunately also reinstalled the Ad Management mod right away so not sure if the array string conversion error existed before that, but it is the only mod that was reinstalled.

By deleting the forum folder, you deleted the installed mods folders/files as well as any attachments and/or custom avatars.

Anyways, can you try something? Uninstall all your currently installed mods, overwrite your forum files with those from the large upgrade package, minus the upgrade files and then run the repair_settings.php and disable all the hooks.

I suspect that the culprit is a third party mod which was not uninstalled, but their files/folders were removed when you did the reinstall.

Blade~

All right, got the mod uninstall, overwrote the existing forum files with the large upgrade, all is running again, but how do I run the repair_settings? Thanks!
'Do nothing and there is nothing that's not done' - Lao Tzu

Running SMF 2.1.2
PHP version: 7.3.33


Blade~

Thank you, all completed, now getting a lot of this new error:

--------------------------------------
Type of error
General
Error message
The callable ! could not be called.
URL of page causing the error
https://../index.php?action=admin;area=logs;sa=errorlog;backtrace=12
Backtrace information
#0: call_helper()
Called from /home2/../Sources/Subs.php on line 4142
#1: obExit()
Called from /home2/../index.php on line 194
----------------------------
From my limited knowledge on this sounds like it's calling a helper module that does not exists?

index.php on line 194:
// Call obExit specially; we're coming from the main area ;).
obExit(null, null, true);

Subs.php on line 4142:

   if (!empty($buffers))
         foreach ($buffers as $function)
         {
            $call = call_helper($function, true);

            // Is it valid?
            if (!empty($call))
               ob_start($call);
'Do nothing and there is nothing that's not done' - Lao Tzu

Running SMF 2.1.2
PHP version: 7.3.33

Advertisement: