mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
- Fixed notifications if included in projects running in command-line where certain variables aren't available.
This commit is contained in:
@@ -123,7 +123,7 @@ class Input {
|
||||
|
||||
$postVars = array();
|
||||
|
||||
if(in_array($_SERVER['REQUEST_METHOD'], ['PUT', 'PATCH', 'DELETE'])) {
|
||||
if(isset($_SERVER['REQUEST_METHOD']) && in_array($_SERVER['REQUEST_METHOD'], ['PUT', 'PATCH', 'DELETE'])) {
|
||||
parse_str(file_get_contents('php://input'), $postVars);
|
||||
} else {
|
||||
$postVars = $_POST;
|
||||
|
||||
Reference in New Issue
Block a user