Fix bad parameter for PUT method
This commit is contained in:
parent
c4ccf6f744
commit
dd08d5d660
@ -364,7 +364,7 @@ function getState($id,$withcode='',$dbtouse=0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $langs->trans("NotDefined");
|
return $langs->transnoentitiesnoconv("NotDefined");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($dbtouse,'');
|
else dol_print_error($dbtouse,'');
|
||||||
|
|||||||
@ -74,9 +74,7 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea
|
|||||||
else if ($postorget == 'PUT')
|
else if ($postorget == 'PUT')
|
||||||
{
|
{
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT'
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT'
|
||||||
if ( ! is_array($param) )
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // Setting param x=a&y=z as PUT fields
|
||||||
parse_str($param, $array_param);
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($array_param)); // Setting param x=a&y=z as PUT fields
|
|
||||||
}
|
}
|
||||||
else if ($postorget == 'HEAD')
|
else if ($postorget == 'HEAD')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user