Closed (fixed)
Project:
User Points
Version:
6.x-1.x-dev
Component:
Code: userpoints API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2011 at 21:13 UTC
Updated:
21 Apr 2011 at 18:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
bdurbin commentedConfirmed in 6.x-1.x-dev and current release version. Lines 590-595 of userpoints.module ensure that if certain keys on the $params array aren't set, that they are initialized to a NULL value. $params['display'] is one of these.
Lines 686-688 use $params['display'] as a part of the logic that determines whether or not to display a message to the user. The portion of the expression that reads:
!array_key_exists('display', $params)is no longer valid, since the code referenced above will ensure that that key is always set.The attached patch resolves the issue.
Comment #2
bdurbin commentedNeglected to set status to "needs review" in the previous post.
Comment #3
berdirThanks, I probably broke that when I fixed the E_NOTICE errors in the tests.