From fbe794e44d235d2f66ef418796f87947631afb6a Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Tue, 3 Mar 2009 16:12:05 +0100 Subject: Improve handling of null values in profile parameters. This commit fixes two issues: - Allowing remote users to clear profile parameters via OMB. - Improved handling of profile parameters which evaluate to false ('0' for example) --- actions/remotesubscribe.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actions/remotesubscribe.php') diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index 7ea7acd6d..a2e01bd3a 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -367,16 +367,16 @@ class RemotesubscribeAction extends Action return; } - if ($profile->fullname) { + if (!is_null($profile->fullname)) { $req->set_parameter('omb_listenee_fullname', $profile->fullname); } - if ($profile->homepage) { + if (!is_null($profile->homepage)) { $req->set_parameter('omb_listenee_homepage', $profile->homepage); } - if ($profile->bio) { + if (!is_null($profile->bio)) { $req->set_parameter('omb_listenee_bio', $profile->bio); } - if ($profile->location) { + if (!is_null($profile->location)) { $req->set_parameter('omb_listenee_location', $profile->location); } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); -- cgit v1.2.3-54-g00ecf