From b792cd703ac554c611891b0f1a092034813c9b7c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 17 Dec 2009 13:31:12 +0300 Subject: [PATCH] api: return error on unknown method --- api/index.php | 5 +++++ 1 file changed, 5 insertions(+) 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);