Explorar o código

Better function isPost

Use $_SERVER['REQUEST_METHOD'] instead of empty($_POST)
Possibly related to #413
Marien Fressinaud %!s(int64=12) %!d(string=hai) anos
pai
achega
9f6fa5f7c6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Minz/Request.php

+ 1 - 1
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';
 	}
 }