After #441678: Use drupal_write_record(). Needed to be able to import transactions with migrate_extras, passing an integer into userpoints_userpointsapi causes the points to be overwritten, since they're being passed into the function by reference. I'm about to send a patch that resets the incoming $param variable to the original value if it isn't an array. Also suppling a test to ensure this doesn't happen again. This should also fix #560972: Wrong calculation of userpoints in case of points updates

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Brandonian’s picture

Status: Active » Needs review
FileSize
2.3 KB

Attached is a patch that fixes the bug, along with a simpletest to ensure it won't happen again.

kbahey’s picture

Status: Needs review » Fixed

Committed.

Thank you.

Be careful in the future.

kbahey’s picture

Status: Fixed » Needs work

This is causing API problems #786378: Last DEV release incompatible with UserPointsContrib module.

Therefore I am rolling this back.

manuel.adan’s picture

Component: Code: userpoints API » Code: userpoints
Assigned: Brandonian » Unassigned
Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing this as outdated, 6.x version is no longer maintained. Seems that it was fixed though.