Empty resource would throw exception
The "+ Remote" link on your profile page broke because of exception.
This commit is contained in:
parent
57f78dc61c
commit
2744bdcdb7
@ -242,7 +242,11 @@ class OStatusSubAction extends Action
|
|||||||
function pullRemoteProfile()
|
function pullRemoteProfile()
|
||||||
{
|
{
|
||||||
$validate = new Validate();
|
$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 {
|
try {
|
||||||
if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) {
|
if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) {
|
||||||
$this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);
|
$this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);
|
||||||
|
Loading…
Reference in New Issue
Block a user