Getting odd error in manager: TypeError: array_key_exists(): Argument #2 ($array) must be of type array, int given

Summary

Step to reproduce

I don’t know, we updated recently from 2.x to 3.1.1-pl and updated the php version to the recommended one and since there have been weird things happening.

Observed behavior

Screenshot is what all the manager pages show

Environment

modx 3.1.1-pl, PHP 8.2, I can try and figure out the server type, but its off of CPanel and I’m more frontend oriented.

Not sure why this error occurs.

Does the file core/cache/lexicon_topics/native.cache.php exist? Does it have the correct file permissions?


The error seems to occur here in the code

because the cache-manager (on line 524) somehow returns an integer instead of an array with the data (= all the language codes and their full names).

Yes, that file exists, and its permissions are 0644.

Yeah, by all accounts, it doesn’t make sense why this is happening when it’s been going fine (relative) for the last month at least.

What’s the content of this file? (core/cache/lexicon_topics/native.cache.php)

Huh, its empty, nothing inside

If you delete the file (or the whole cache folder), does it get regenerated with the correct content?

I deleted the file and the file came back with 0 content. Just to clarify, i should be deleting the folder at core/cache, right?

Okay, deleting the cache folder brought back the manager pages, with a small php error at the top of the page. But it disappears after a refresh. I might be good for now, hopefully