4
0
Эх сурвалжийг харах

Better function isPost

Use $_SERVER['REQUEST_METHOD'] instead of empty($_POST)
Possibly related to #413
Marien Fressinaud 12 жил өмнө
parent
commit
9f6fa5f7c6

+ 1 - 1
lib/Minz/Request.php

@@ -199,6 +199,6 @@ class Minz_Request {
 	}
 	}
 
 
 	public static function isPost () {
 	public static function isPost () {
-		return !empty ($_POST) || !empty ($_FILES);
+		return $_SERVER['REQUEST_METHOD'] === 'POST';
 	}
 	}
 }
 }