From 1af73284c8d86843d49808da38289c9c9da6574b Mon Sep 17 00:00:00 2001 From: thomascorthals Date: Thu, 8 Dec 2022 10:02:13 +0100 Subject: [PATCH] Support https in file_get_contents polyfill --- phpthumb.functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpthumb.functions.php b/phpthumb.functions.php index f74c2c2..d8bc706 100644 --- a/phpthumb.functions.php +++ b/phpthumb.functions.php @@ -1049,8 +1049,8 @@ function preg_quote($string, $delimiter='\\') { if (!function_exists('file_get_contents')) { // included in PHP v4.3.0+ function file_get_contents($filename) { - if (preg_match('#^(f|ht)tp\://#i', $filename)) { - return SafeURLread($filename, $error); + if (preg_match('#^(ftp|https?)\://#i', $filename)) { + return phpthumb_functions::SafeURLread($filename, $error); } if ($fp = @fopen($filename, 'rb')) { $rawData = '';