Closed (fixed)
Project:
User Relationships
Version:
6.x-1.x-dev
Component:
Defaults
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2010 at 23:59 UTC
Updated:
20 Mar 2012 at 00:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
glitz commentedany update on how this was fixed? This is happening to me as well, only when adding a friend (relationship)
Thanks!
Chris
Comment #2
mmachina commentedgetting the same error when deleting a default friend...
Comment #3
mrf commentedComment #4
mrf commentedI just:
Set up a default user.
Created 50 users who have a relationshiip with this user.
Deleted the default user.
No error messages on relationship or user pages, think this one must have been fixed along the way.
Comment #5
mrf commentedAfter going back to the UR admin page I noticed some notices caused by my tests for this, but no fatal error.
Committed a fix to ur defaults hook_user that now deletes the default entry when a user is deleted and should prevent any future issues like the above from occurring.
http://drupalcode.org/project/user_relationships.git/blobdiff/0c49e3f0df...
Comment #6
mrf commentedAnd here's a version of this for d7.
Comment #7
berdirThat condition makes no sense :) fetchAssoc() returns an array then you're using it as an object.
Just do the db_delete(), if there is something to delete, it will delete and if the condition doesn't match anything, nothing happens...
Comment #8
mrf commentedAnd an actual tested working version of the patch. Failed mental transition between 6 and 7 :)
Comment #9
berdirI'm not sure why it needs to be so complicated?
Why not simply do it as I did in my patch?
Comment #10
mrf commentedAhhhh the magic of dbtng I stared at that one for a while trying to figure out what you meant by "just do db_delete()" and fell back to my version after wiping out all my defaults :)
Comment #11
berdirCommited, not sure what the testbot i waiting for.
Giving this one back to you, you might wanna simplify your code...
Comment #12
mrf commentedSimplified version committed to 6.x