瀏覽代碼

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