Closed (fixed)
Project:
User Badges
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2012 at 13:47 UTC
Updated:
6 Sep 2012 at 21:31 UTC
Notice: Undefined property: stdClass::$badges_all in user_badges_user_presave() (line 343 of .../user_badges/user_badges.module).
Warning: key_exists() expects parameter 2 to be array, null given in user_badges_user_presave() (line 343 of .../user_badges/user_badges.module).
I don't think this affects the functionality of the module at all, but I figured it should have a report. Original comment.
Comments
Comment #1
shane1090 commentedThis appears to be caused by the UID for the user not having been created yet so lookups for what badges that user have cannot be made. My fix for this was to simply check if the $account->uid was empty or not - the start of the 'user_badges_user_presave' function for me now looks like this:
Notice the additional variable check in line 2.
Comment #2
Mizpah commentedThanks shane1090,
This worked for me - any other issues found in later testing due to this ?
Comment #3
shane1090 commentedGlad it worked for you Mizpah. I've not had any further issues as a result of this change.
Comment #4
nancydruThanks for catching this.
Comment #5.0
(not verified) commentedAdding a source.