]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/atompubsubscriptionfeed.php
Event upgraded to microformats2
[quix0rs-gnu-social.git] / actions / atompubsubscriptionfeed.php
index 5c7184e5c1da365bdf9bb1b24aa1403f65a0f000..c0f695dc42cc7603db9c89ea21cb3e9721723254 100644 (file)
@@ -252,10 +252,9 @@ class AtompubsubscriptionfeedAction extends ApiAuthAction
             }
 
             // XXX: OStatus discovery (maybe)
-
-            $profile = Profile::fromURI($person->id);
-
-            if (empty($profile)) {
+            try {
+                $profile = Profile::fromUri($person->id);
+            } catch (UnknownUriException $e) {
                 // TRANS: Client exception thrown when subscribing to a non-existing profile.
                 // TRANS: %s is the unknown profile ID.
                 $this->clientError(sprintf(_('Unknown profile %s.'), $person->id));