Closed (won't fix)
Project:
Privatemsg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2010 at 23:03 UTC
Updated:
26 Jul 2016 at 14:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirdb_affected_rows() is pretty much flawed, here is a better approach.
Comment #2
berdirFixed in 6.x-1.x-dev and 6.x-2.x-dev. In 7.x-1.x, we are using db_merge() which doesn't need this fix.
Comment #4
savioret commentedIt still happens in latest 6.x-2.x-dev
The function privatemsg_set_setting seems not to be using any db_merge call.
Comment #5
berdirPlease describe how exactly this happens.
There is no db_merge() in Drupal 6. So we probably only need to prevent any errors using @ in front of the db_query('UPDATE... line.
Patches are welcome.
Comment #6
savioret commentedThank you, It would be great if this could be patched. I happens always that the user profile is saved and the saved value has not changed.
The problem is that mysql returns affected_rows = 0 if there was no need to update because the new value is the same as in the database (it happens when the value did not change in the update operation).
Well, other solution would be adding the @ in this line, but I think that the first one is more secure:
Related: #1281350: Duplicate entry error when saving user
Comment #7
jgraham commentedAttached patch implements Insert db_query with '@' prefix.
Comment #9
berdir#7: privatemsg-738880-7.patch queued for re-testing.
Comment #10
ptmkenny commentedMarked https://drupal.org/node/1281350 as duplicate
Comment #11
oadaeh commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.