Skip to content

Commit

Permalink
Merge pull request #203 from thomascorthals/file-get-contents
Browse files Browse the repository at this point in the history
Support https in file_get_contents polyfill
  • Loading branch information
JamesHeinrich authored Dec 9, 2022
2 parents 2d18d18 + 1af7328 commit efa0bf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpthumb.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit efa0bf6

Please sign in to comment.