summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-02 14:33:14 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-02 14:33:14 -0400
commit38a621dcf8cfdc7de85e49d3f7cbbe40cc19243a (patch)
treedf6fabe572a76464407b878861b9c16569e37c7b
parent98437f21f9402d5a6c3569a0c558b13881d77848 (diff)
fix assignment of omb stuff
darcs-hash:20080602183314-84dde-1f81609b2eb0d628c0e6dfe5fea7e21d799bdb3d.gz
-rw-r--r--actions/remotesubscribe.php2
-rw-r--r--lib/omb.php3
2 files changed, 4 insertions, 1 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index 4594bb37e..4cb388fb1 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -223,7 +223,7 @@ class RemotesubscribeAction extends Action {
foreach ($types as $type) {
$matches = $xrd->services(omb_service_filter($type));
if ($matches) {
- $omb[$type] = $services[0];
+ $omb[$type] = $matches[0];
} else {
# no match for type
return false;
diff --git a/lib/omb.php b/lib/omb.php
index ae7531ce8..fc873d0d5 100644
--- a/lib/omb.php
+++ b/lib/omb.php
@@ -86,6 +86,9 @@ function omb_service_uri($service) {
}
function omb_local_id($service) {
+ if (!$service) {
+ return NULL;
+ }
$els = $service->getElements('LocalID');
return ($els) ? $els[0] : NULL;
}