From e14c88f6c52fddeeb26c71f13e93db7a8fabdd3b Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Mon, 16 Nov 2009 14:59:32 -0500 Subject: Consistant error for groups that dont exist in API --- actions/apitimelinegroup.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'actions/apitimelinegroup.php') diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index f25f6ba51..de13e7eb9 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -69,7 +69,6 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction parent::prepare($args); $this->group = $this->getTargetGroup($this->arg('id')); - $this->notices = $this->getNotices(); return true; } @@ -87,6 +86,13 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction function handle($args) { parent::handle($args); + + if (empty($this->group)) { + $this->clientError(_('Group not found!'), 404, $this->format); + return false; + } + + $this->notices = $this->getNotices(); $this->showTimeline(); } -- cgit v1.2.3-54-g00ecf