[-] CORE : Report of https://github.com/PrestaShop/PrestaShop/pull/504 Thanks @aseques
This commit is contained in:
+9
-7
@@ -1303,14 +1303,16 @@ class ToolsCore
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
$opts = stream_context_get_options($stream_context);
|
||||
if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post')
|
||||
{
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
if (isset($opts['http']['content']))
|
||||
if ($stream_context != null) {
|
||||
$opts = stream_context_get_options($stream_context);
|
||||
if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post')
|
||||
{
|
||||
parse_str($opts['http']['content'], $datas);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $datas);
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
if (isset($opts['http']['content']))
|
||||
{
|
||||
parse_str($opts['http']['content'], $datas);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $datas);
|
||||
}
|
||||
}
|
||||
}
|
||||
$content = curl_exec($curl);
|
||||
|
||||
Reference in New Issue
Block a user