From: Andrew Dolgov Date: Thu, 17 Dec 2009 10:31:12 +0000 (+0300) Subject: api: return error on unknown method X-Git-Tag: 1.4.0~176 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b792cd703ac554c611891b0f1a092034813c9b7c;p=tt-rss.git api: return error on unknown method --- diff --git a/api/index.php b/api/index.php index d3b5ff4f..5c1efd15 100644 --- a/api/index.php +++ b/api/index.php @@ -364,6 +364,11 @@ $pref_name = db_escape_string($_REQUEST["pref_name"]); print json_encode(array("value" => get_pref($link, $pref_name))); break; + + default: + print json_encode(array("error" => 'UNKNOWN_METHOD')); + break; + } db_close($link);