Closed (fixed)
Project:
Buddylist
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2006 at 13:33 UTC
Updated:
5 Jul 2006 at 06:50 UTC
the buddylist links in the userprofile are quite strange and do not work (drupal cvs, buddylist cvs):
http://yourwebsite.com/buddy/add/2?destination=user/2
http://yourwebsite.com/buddy/add/16?destination=user/16
the code in the install.txt (template.php) generates more strange links.
Comments
Comment #1
kus commentedhttp://starfrosch.ch/1/buddy/add/33?destination=user%2F33
this adds user 3 to buddylist, instead of user 33...
Comment #2
kus commentedi don't get the idea why you $uid = (int)$uid[0] ....this returns only the first number of the userid...uncommenting helps.
function buddylist_addbuddy($uid) {
global $user;
// $uid = (int)$uid[0];
$buddy = user_load(array('uid' => $uid));
Comment #3
robertdouglass commentedI don't know what you mean in your first comment about the weird links. The issue of add/33 adding "3" has been fixed in the latest for 4-7.
Comment #4
alliax commentedwhy not fixing it in deletebuddies function too? If it needs an issue opened by bug, this module will never be completed! :-)
in deletebuddies function there's still
So I'm removing [0] now.. please do it too on the cvs
Comment #5
robertdouglass commentedThere was all sorts of cruft pertaining to $uid in arrays. I think I've rooted it all out now... would appreciate a bit of testing. (no patch, has been committed)
Comment #6
quicksketchI haven't found any problems (PHP4 or PHP5). There is no longer any typecasting at all in these functions, since it was mainly a problem that began with passing in incorrect input.