]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix assignment of omb stuff
authorEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 18:33:14 +0000 (14:33 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 18:33:14 +0000 (14:33 -0400)
darcs-hash:20080602183314-84dde-1f81609b2eb0d628c0e6dfe5fea7e21d799bdb3d.gz

actions/remotesubscribe.php
lib/omb.php

index 4594bb37ec83ada683638e97220ee51f5273b4be..4cb388fb1fe9a6fa5e5b309bcbf7924539f77f39 100644 (file)
@@ -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;
index ae7531ce8e1cba4bedf0982f0a906ae8352f70d4..fc873d0d520e1f9dc1abd4aa86f62b2acb30fd54 100644 (file)
@@ -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;
 }