From ea889f6c8e72f4394d84629421689fa9979818d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 14 Dec 2021 11:02:18 +0100 Subject: [PATCH] Properly wrap Guzzle's ConnectException into FontDownloadFailed in FontManager --- wcfsetup/install/files/lib/system/style/FontManager.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/style/FontManager.class.php b/wcfsetup/install/files/lib/system/style/FontManager.class.php index 58466c4c87..60310cfc08 100644 --- a/wcfsetup/install/files/lib/system/style/FontManager.class.php +++ b/wcfsetup/install/files/lib/system/style/FontManager.class.php @@ -7,6 +7,7 @@ use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Client\ClientExceptionInterface; use wcf\system\io\AtomicWriter; use wcf\system\io\HttpFactory; use wcf\system\SingletonFactory; @@ -155,7 +156,7 @@ EOT } else { throw new FontDownloadFailed("Unable to download font family '" . $family . "'.", '', $e); } - } catch (RequestException $e) { + } catch (ClientExceptionInterface $e) { throw new FontDownloadFailed("Unable to download font family '" . $family . "'.", '', $e); } } -- 2.20.1