diff options
author | Adrian Lang <mail@adrianlang.de> | 2009-03-03 16:12:05 +0100 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2009-03-09 08:06:31 +0100 |
commit | fbe794e44d235d2f66ef418796f87947631afb6a (patch) | |
tree | 0ce90398638bdb938ebab6b3b400a3aaece0cc90 /actions/remotesubscribe.php | |
parent | 6ab9d6b14016cf97fe1a31d89591e1a0e919c8a7 (diff) |
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)
Diffstat (limited to 'actions/remotesubscribe.php')
-rw-r--r-- | actions/remotesubscribe.php | 8 |
1 files changed, 4 insertions, 4 deletions
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); |