From dd08d5d660190215a8ac62275c44ce8b058f4821 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Jun 2015 03:39:43 +0200 Subject: [PATCH] Fix bad parameter for PUT method --- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/geturl.lib.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 9c93fa8fe89..7d4ce9ceebf 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -364,7 +364,7 @@ function getState($id,$withcode='',$dbtouse=0) } else { - return $langs->trans("NotDefined"); + return $langs->transnoentitiesnoconv("NotDefined"); } } else dol_print_error($dbtouse,''); diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index c02c896eb1b..af0c6b91da0 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -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') {