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