소스 검색

Better function isPost

Use $_SERVER['REQUEST_METHOD'] instead of empty($_POST)
Possibly related to #413
Marien Fressinaud 12 년 전
부모
커밋
9f6fa5f7c6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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';
 	}
 }