]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
Make Profile::fromUri use UnknownUriException
[quix0rs-gnu-social.git] / classes / Notice.php
index 8114ca9e670ebdb19facbc54c45695d374a26115..25422aa332d5b8ef6b421075f8e505aeaeff3899 100644 (file)
@@ -1256,10 +1256,9 @@ class Notice extends Managed_DataObject
         $sender = Profile::getKV($this->profile_id);
 
         foreach (array_unique($uris) as $uri) {
-
-            $profile = Profile::fromURI($uri);
-
-            if (!$profile instanceof Profile) {
+            try {
+                $profile = Profile::fromUri($uri);
+            } catch (UnknownUriException $e) {
                 common_log(LOG_WARNING, "Unable to determine profile for URI '$uri'");
                 continue;
             }