Fixed issue with multiple values passed in via _PUT

This commit is contained in:
Josh Sherman 2013-12-19 14:31:46 -05:00
parent d2f1eeb8b0
commit fa5ef9d858

View file

@ -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);
} }