]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Empty resource would throw exception
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 19 Apr 2017 09:37:43 +0000 (11:37 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 19 Apr 2017 09:37:43 +0000 (11:37 +0200)
The "+ Remote" link on your profile page broke because of exception.

plugins/OStatus/actions/ostatussub.php

index a8039ae56532226705b68ea6298a985e1f193779..7531bb688644faa556684b799566702f317daf6d 100644 (file)
@@ -242,7 +242,11 @@ class OStatusSubAction extends Action
     function pullRemoteProfile()
     {
         $validate = new Validate();
-        $this->profile_uri = Discovery::normalize($this->trimmed('profile'));
+        try {
+            $this->profile_uri = Discovery::normalize($this->trimmed('profile'));
+        } catch (Exception $e) {
+            $this->profile_uri = null;
+        }
         try {
             if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) {
                 $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);