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

Fix missing REQUEST_METHOD

Useful when executing actualize_script.php
Marien Fressinaud 12 жил өмнө
parent
commit
ede94098be

+ 2 - 1
lib/Minz/Request.php

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