From 5295e8d4de9c20ee06c3219669f5824c492478f9 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 22 Nov 2014 12:29:13 +0100 Subject: [PATCH] Report a 404 not found if no posts found for User timeline --- actions/apitimelineuser.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php index b105a29dd1..aa6cfca458 100644 --- a/actions/apitimelineuser.php +++ b/actions/apitimelineuser.php @@ -252,6 +252,11 @@ class ApiTimelineUserAction extends ApiBareAuthAction } } + if (empty($notices)) { + // TRANS: When no posts were found with specific or default parameters + $this->clientError(_('Did not find any posts within search parameters'), 404); + } + return $notices; } -- 2.39.5