parent::prepare($args);
$this->group = $this->getTargetGroup($this->arg('id'));
+ if (empty($this->group)) {
+ // TRANS: Client error displayed trying to show group membership on a non-existing group.
+ $this->clientError(_('Group not found.'), 404, $this->format);
+ return false;
+ }
+
$this->profiles = $this->getProfiles();
return true;
{
parent::handle($args);
- if (empty($this->group)) {
- // TRANS: Client error displayed trying to show group membership on a non-existing group.
- $this->clientError(_('Group not found.'), 404, $this->format);
- return false;
- }
-
// XXX: RSS and Atom
switch($this->format) {
break;
default:
$this->clientError(
- // TRANS: Client error displayed trying to execute an unknown API method showing group membership.
+ // TRANS: Client error displayed when coming across a non-supported API method.
_('API method not found.'),
404,
$this->format