From a2195dc572bea7f01e179d9057cbd84cec8cbfd5 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 15 May 2020 18:52:54 +0200 Subject: [PATCH] 093 helper pour Free --- core/class/helper.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index 12f56f93..1d4fd19f 100755 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -24,12 +24,14 @@ class helper { */ public static function urlGetContents ($url) { - if(function_exists('file_get_contents') and - ini_get('allow_url_fopen') ){ + if(function_exists('file_get_contents') && + ini_get('allow_url_fopen') && + is_readable($url) ){ $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') )){ + function_exists('stream_get_contents') && + ini_get('allow_url_fopen') && + is_readable($url) ){ $handle = fopen ($url, "r"); $url_get_contents_data = stream_get_contents($handle); }else{