forked from GNUsocial/gnu-social
Abort on failure instead of return early success
This commit is contained in:
parent
bc51c6b64f
commit
db7154c63b
@ -101,10 +101,10 @@ class Ostatus_profile extends Managed_DataObject
|
||||
}
|
||||
|
||||
$profile = Profile::getKV('id', $this->profile_id);
|
||||
if ($profile instanceof Profile) {
|
||||
return $profile;
|
||||
if (!$profile instanceof Profile) {
|
||||
throw new NoProfileException($this->profile_id);
|
||||
}
|
||||
throw new NoProfileException($this->profile_id);
|
||||
return $profile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user