add: .gitignore | fix: api.core.Request (InvalidHttpError if not in **AND** not in @forced_method)
This commit is contained in:
parent
3fe0b7590a
commit
b706948b3a
|
@ -0,0 +1,2 @@
|
|||
/node_modules
|
||||
/.vscode
|
|
@ -103,7 +103,7 @@
|
|||
$params = (is_array($params)) ? $params : [];
|
||||
|
||||
/* (3) On définit en constante la méthode HTTP */
|
||||
if( !isset($_SERVER['REQUEST_METHOD']) || !is_string($forced_method) )
|
||||
if( !isset($_SERVER['REQUEST_METHOD']) && !is_string($forced_method) )
|
||||
return $this->error->set(Err::UnknownHttpMethod);
|
||||
|
||||
$this->http_method = is_string($forced_method) ? strtoupper($forced_method) : strtoupper($_SERVER['REQUEST_METHOD']);
|
||||
|
|
Loading…
Reference in New Issue