From 9f6fa5f7c6e476aceb8a1979cd62f6fbf53b6757 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 11 Feb 2014 23:42:24 +0100 Subject: Better function isPost Use $_SERVER['REQUEST_METHOD'] instead of empty($_POST) Possibly related to #413 --- lib/Minz/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Minz/Request.php') diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index d4e1355d7..282d47a77 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -199,6 +199,6 @@ class Minz_Request { } public static function isPost () { - return !empty ($_POST) || !empty ($_FILES); + return $_SERVER['REQUEST_METHOD'] === 'POST'; } } -- cgit v1.2.3