Niji Posted January 20, 2023 Posted January 20, 2023 Hi, I'm upgrading my forum from an old IPB3 setup and I'm getting the error: array_map(): Argument #2 ($array) must be of type array, bool given There's no other explanation provided or error number or anything. It seems to have occurred while updating the gallery. Everything seemed to be going just fine though and it looks like the updater seems to work otherwise. I'm on a self-hosted license, but all my client area information is updated if that helps. If you guys have any advice or anything it'd be much appreciated.
teraßyte Posted January 20, 2023 Posted January 20, 2023 I posted a fix for this error in this post: Niji, Mark H and Afrodude 3
Niji Posted January 20, 2023 Author Posted January 20, 2023 (edited) Thanks for the help! After applying the code swap I'm getting a new error from the same file. It seems to be getting angry at the trim function now.trim(): Argument #1 ($string) must be of type string, array given Edited January 20, 2023 by Niji
teraßyte Posted January 20, 2023 Posted January 20, 2023 I need another screenshot like the second one in your first post that tells me which application and upgrade step it's stuck on.
Niji Posted January 20, 2023 Author Posted January 20, 2023 It's the exact same spot, Gallery 60000, status 1. Exactly like in the previous screenshot. It seems to be getting angry at the exact same spot in the 60000 file as well. Right where the code is swapped out at Line 236. There's no other trim function I'm seeing in that file. With the swap the trim function sits on Line 245. $imageUpdate['image_metadata'] = json_encode( array_map( 'trim', $tmpMeta ) ); I was wondering if there's some method to just skip all of it, to be honest. I only really need the forum itself and maybe the downloads section to be updated, though I can always recover the files from the downloads section and re-upload the important ones. Losing the rest of the stuff like the gallery and blog wouldn't hurt the site at all. Is it possible to just skip out on those sections entirely?
teraßyte Posted January 20, 2023 Posted January 20, 2023 Strange, the code is indeed using array_map(). You must have some very old data with a different format. If you just want to skip the whole metadata conversion you can simply comment/remove that line completely and continue with the upgrade.
Niji Posted January 20, 2023 Author Posted January 20, 2023 Thanks a bunch. So far so good, commenting it out let me get through it. I'm hiccuping on the calendar section, but it seems to be a totally different issue from the guy in the topic you had linked earlier. This is the error here: ksort(): Argument #1 ($array) must be of type array, null given I'm definitely a bit confused though. I'm getting "Not set" for the file version
teraßyte Posted January 21, 2023 Posted January 21, 2023 Quote Current Version: Not Set That's the first time I've seen that. No idea about this one, sorry. It would require to debug in which file exactly it's failing and why it's reporting Not Set. The two are related most likely.
Recommended Posts