Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | userpoints-785652-pass_by_ref_bug.patch | 2.3 KB | Brandonian |
Comments
Comment #1
Brandonian CreditAttribution: Brandonian commentedAttached is a patch that fixes the bug, along with a simpletest to ensure it won't happen again.
Comment #2
kbahey CreditAttribution: kbahey commentedCommitted.
Thank you.
Be careful in the future.
Comment #3
kbahey CreditAttribution: kbahey commentedThis is causing API problems #786378: Last DEV release incompatible with UserPointsContrib module.
Therefore I am rolling this back.
Comment #4
manuel.adanClosing this as outdated, 6.x version is no longer maintained. Seems that it was fixed though.