Fixed issue with multiple values passed in via _PUT
This commit is contained in:
parent
d2f1eeb8b0
commit
fa5ef9d858
1 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,14 @@ class APIv1 extends CustomModule
|
||||||
if ($_SERVER['REQUEST_METHOD'] == 'PUT')
|
if ($_SERVER['REQUEST_METHOD'] == 'PUT')
|
||||||
{
|
{
|
||||||
parse_str(file_get_contents("php://input"), $_PUT);
|
parse_str(file_get_contents("php://input"), $_PUT);
|
||||||
|
|
||||||
|
foreach ($_PUT as $key => $value)
|
||||||
|
{
|
||||||
|
unset($_PUT[$key]);
|
||||||
|
|
||||||
|
$_PUT[str_replace('amp;', '', $key)] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
$_REQUEST = array_merge($_REQUEST, $_PUT);
|
$_REQUEST = array_merge($_REQUEST, $_PUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue