mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
More secured getURLContent method. Add PHPUnit on getURLContent
This commit is contained in:
@@ -1634,7 +1634,7 @@ class Setup extends DolibarrApi
|
||||
$xmlarray = getURLContent($xmlremote);
|
||||
|
||||
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
|
||||
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404')
|
||||
{
|
||||
$xmlfile = $xmlarray['content'];
|
||||
//print "xmlfilestart".$xmlfile."endxmlfile";
|
||||
|
||||
Reference in New Issue
Block a user