January 28th, 2021 at 6:26 AM
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:
WITH:
(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)