Ver Fonte

Fix missing REQUEST_METHOD

Useful when executing actualize_script.php
Marien Fressinaud há 11 anos atrás
pai
commit
ede94098be
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      lib/Minz/Request.php

+ 2 - 1
lib/Minz/Request.php

@@ -222,6 +222,7 @@ class Minz_Request {
 	}
 
 	public static function isPost() {
-		return $_SERVER['REQUEST_METHOD'] === 'POST';
+		return isset($_SERVER['REQUEST_METHOD']) &&
+			$_SERVER['REQUEST_METHOD'] === 'POST';
 	}
 }