summaryrefslogtreecommitdiff
path: root/lib/omb.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
commitb3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (patch)
tree76666150701f03205bfff77e7d034dfa724f8764 /lib/omb.php
parent399669b1fb955d2d8c18098a7b551184d534a94c (diff)
parente185c0395a6cd250ccd7c8e385c54830be73f937 (diff)
Merge branch '0.7.x' into 0.8.x
Conflicts: classes/Notice.php lib/action.php lib/router.php lib/twitter.php
Diffstat (limited to 'lib/omb.php')
-rw-r--r--lib/omb.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/omb.php b/lib/omb.php
index befcf4666..e8e1acc41 100644
--- a/lib/omb.php
+++ b/lib/omb.php
@@ -251,7 +251,6 @@ function omb_broadcast_profile($profile)
function omb_update_profile($profile, $remote_profile, $subscription)
{
- global $config; # for license URL
$user = User::staticGet($profile->id);
$con = omb_oauth_consumer();
$token = new OAuthToken($subscription->token, $subscription->secret);
@@ -295,7 +294,7 @@ function omb_update_profile($profile, $remote_profile, $subscription)
common_debug('Got HTTP result "'.print_r($result,true).'"', __FILE__);
- if (empty($result) || $result) {
+ if (empty($result) || !$result) {
common_debug("Unable to contact " . $req->get_normalized_http_url());
} else if ($result->status == 403) { # not authorized, don't send again
common_debug('403 result, deleting subscription', __FILE__);
@@ -306,7 +305,7 @@ function omb_update_profile($profile, $remote_profile, $subscription)
return false;
} else { # success!
parse_str($result->body, $return);
- if ($return['omb_version'] == OMB_VERSION_01) {
+ if (isset($return['omb_version']) && $return['omb_version'] === OMB_VERSION_01) {
return true;
} else {
return false;