mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-21 16:11:48 +00:00
throw a QRException instead
and change the function signature
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user