From e9d97b49b13d0d29bfabda28aeb11117bd34d8f7 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 12 Mar 2021 07:21:56 +0100 Subject: [PATCH] curl order in function --- core/class/helper.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index 7c05699a..e0b0a7e0 100755 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -52,11 +52,6 @@ class helper { if(function_exists('file_get_contents') && ini_get('allow_url_fopen') ){ $url_get_contents_data = @file_get_contents($url); // Masque un warning éventuel - }elseif(function_exists('fopen') && - function_exists('stream_get_contents') && - ini_get('allow_url_fopen')){ - $handle = fopen ($url, "r"); - $url_get_contents_data = stream_get_contents($handle); }elseif(function_exists('curl_version')){ $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); @@ -64,6 +59,11 @@ class helper { curl_setopt($ch, CURLOPT_URL, $url); $url_get_contents_data = curl_exec($ch); curl_close($ch); + }elseif(function_exists('fopen') && + function_exists('stream_get_contents') && + ini_get('allow_url_fopen')){ + $handle = fopen ($url, "r"); + $url_get_contents_data = stream_get_contents($handle); }else{ $url_get_contents_data = false; }