MyBB Community Forums

Full Version: Lots of Warnings Undefined variable or array key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Lately I've noticed that my website is throwing a lot of warnings with Undefined variable or Undefined array key. Sadly I don't know what is exact moment when that happen and for months i didn't do any changes, but I don't really know how to fix it.
Maybe it's connected to the PHP upgrade on my host provider side? No idea if that makes any sense, I'm completely out of my league here.

What i did 1st is to update MyBB to the latest version, but warnings showed up even during upgrading process and stayed after:
[Image: AEYmBYSkHT90jj4a6Yj03H01UDUuY4mW28d9Scdf...w1912-h966]
2nd thing i did was to disable plugins, but no change.
3rd I started googling and when i enter phrase of MyBB FreeBSD "Undefined array key" it turned out that there is bunch of websites with same warnings.
4th I went here and searched if people don't have this issue. Search engine in MyBB isn't really grate, so I had to go through lots of different topics without much of a luck, but I did manage to find this: https://community.mybb.com/thread-237617.html, but it's in Rejected bugs, so I don't know what to make out of it. Generally looks like this guy did a lot of fixing himself, so isn't much help for me, because I don't know PHP.

So, I hope for you, Dear MyBB community, for some help or guidance.
Forum URL: https://nokor.co.pl/ (it will look empty)

Thanks!
please check ACP --> Templates --> Find Updated Templates

some of your templates are not up to date!
Thanks! That was a good advice!
I did some testsing and updated default templates. I did deactivate all my plugins and switched to Default Template (which is original to the newest version), but still warnings exists. There's a lot less of them, to be fair. Any idea where to start to remove other warnings?
so let's take a look what left over after template-check

it seems there are some language-variables missing in global.lang.php

you can add this variables to your language pack

all warnings with Undefined property: MyLanguage belong to this problem
Hey! It worked! Kudos to you. 👏
I don't see any other errors on Default template, only on custom one. But I think I'm starting to understand roughly what's going on. I'll look to update some plugins and - apparently custom Template? I assume that Default template is always deployed with newest version, but custom Templates are 100% separate from update process.

Thanks a lot for that help!
good luck!
It looks like most of the warnings posted about in 1.8.33 are updated in 1.8.37.
If there are any more found in the course of normal operations here, they will be reported.

Just finally getting the time to jump from 1.8.36 to current.