mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/17480] Properly catch RuntimeException if no http handler is available
PHPBB-17480
This commit is contained in:
@@ -74,9 +74,16 @@ class file_downloader
|
||||
* message is returned
|
||||
*/
|
||||
public function get(string $host, string $directory, string $filename, int $port = 443, int $timeout = 6)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Initialize Guzzle client
|
||||
$client = $this->create_client($host, $port, $timeout);
|
||||
}
|
||||
catch (\RuntimeException $exception)
|
||||
{
|
||||
throw new runtime_exception($exception->getMessage());
|
||||
}
|
||||
|
||||
// Set default values for error variables
|
||||
$this->error_number = 0;
|
||||
|
Reference in New Issue
Block a user