Fix bad parameter for PUT method

This commit is contained in:
Laurent Destailleur 2015-06-07 03:39:43 +02:00
parent c4ccf6f744
commit dd08d5d660
2 changed files with 2 additions and 4 deletions

View File

@ -364,7 +364,7 @@ function getState($id,$withcode='',$dbtouse=0)
}
else
{
return $langs->trans("NotDefined");
return $langs->transnoentitiesnoconv("NotDefined");
}
}
else dol_print_error($dbtouse,'');

View File

@ -74,9 +74,7 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea
else if ($postorget == 'PUT')
{
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT'
if ( ! is_array($param) )
parse_str($param, $array_param);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($array_param)); // Setting param x=a&y=z as PUT fields
curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // Setting param x=a&y=z as PUT fields
}
else if ($postorget == 'HEAD')
{