diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 20e7acff91..7b6623e19a 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -352,6 +352,7 @@ $lang = array_merge($lang, array( 'HIDE_ME' => 'Hide my online status this session', 'HOURS' => 'Hours', 'HOME' => 'Home', + 'HTTP_HANDLER_NOT_FOUND' => 'The operation could not be completed because the cURL PHP extension and allow_url_fopen PHP ini setting have been disabled and no other HTTP handler could be found.', 'ICQ' => 'ICQ', 'IF' => 'If', diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php index 6c09cce831..88378d3a3a 100644 --- a/phpBB/phpbb/file_downloader.php +++ b/phpBB/phpbb/file_downloader.php @@ -75,8 +75,15 @@ class file_downloader */ public function get(string $host, string $directory, string $filename, int $port = 443, int $timeout = 6): bool|string { - // Initialize Guzzle client - $client = $this->create_client($host, $port, $timeout); + try + { + // Initialize Guzzle client + $client = $this->create_client($host, $port, $timeout); + } + catch (\RuntimeException $exception) + { + throw new runtime_exception('HTTP_HANDLER_NOT_FOUND'); + } // Set default values for error variables $this->error_number = 0;