From 6194bb08a78dd99c33d48d281784772952207cd3 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Tue, 7 May 2024 03:16:01 +0200 Subject: [PATCH] throw a QRException instead and change the function signature --- lib/Providers/Qr/BaseHTTPQRCodeProvider.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Providers/Qr/BaseHTTPQRCodeProvider.php b/lib/Providers/Qr/BaseHTTPQRCodeProvider.php index fcd8744..fc43462 100644 --- a/lib/Providers/Qr/BaseHTTPQRCodeProvider.php +++ b/lib/Providers/Qr/BaseHTTPQRCodeProvider.php @@ -4,13 +4,11 @@ declare(strict_types=1); namespace RobThree\Auth\Providers\Qr; -use RobThree\Auth\TwoFactorAuthException; - abstract class BaseHTTPQRCodeProvider implements IQRCodeProvider { protected bool $verifyssl = true; - protected function getContent(string $url): string|bool + protected function getContent(string $url): string { $curlhandle = curl_init(); @@ -25,7 +23,7 @@ abstract class BaseHTTPQRCodeProvider implements IQRCodeProvider )); $data = curl_exec($curlhandle); if ($data === false) { - throw new TwoFactorAuthException(curl_error($curlhandle)); + throw new QRException(curl_error($curlhandle)); } curl_close($curlhandle);