Abort on failure instead of return early success

This commit is contained in:
Mikael Nordfeldth 2015-01-13 13:18:57 +01:00
parent bc51c6b64f
commit db7154c63b

View File

@ -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