Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Need Help to MYBB Plugin Avatar Gallery

#4
I think I've got it fixed. It was due to an unitialized variable that never gets set if there are no avatars. Even though it's trying to count and check if any exist, the variable itself was never declared prior, thus causing the warning.

(This would have been ignored on prior PHP versions. More recent PHP versions started throwing warnings for this sort of thing. ).

An easy fix is to add the isset() condition to the if statement. This will cause it to consider an unset variable to be an empty avatar list (as was intended by the plugin author).

On line 599, replace:

Code:
    if(count($avatar) == 0)

WITH:

Code:
    if(!isset($avatar) || count($avatar) == 0)

Reply


Messages In This Thread
Need Help to MYBB Plugin Avatar Gallery - by tc4me - January 27th, 2021 at 4:08 PM
RE: Need Help to MYBB Plugin Avatar Gallery - by Darth-Apple - January 27th, 2021 at 5:29 PM
RE: Need Help to MYBB Plugin Avatar Gallery - by tc4me - January 27th, 2021 at 6:14 PM
RE: Need Help to MYBB Plugin Avatar Gallery - by Darth-Apple - January 28th, 2021 at 6:26 AM
RE: Need Help to MYBB Plugin Avatar Gallery - by tc4me - January 28th, 2021 at 11:34 AM



Users browsing this thread: 1 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024