Skip to content
Code-Schnipsel Gruppen Projekte
Commit 9334c060 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next' into 'master'

Next

See merge request !44
Übergeordnete ba91ed84 c979bfdc
No related branches found
Tags 2.0.2
2 Merge Requests!50Update 'next-3.x' with latest changes from 'main',!44Next
Pipeline #8348 bestanden mit Phase
in 58 Sekunden
......@@ -9,4 +9,26 @@ parameters:
- types
bootstrapFiles:
- tests/phpstan-bootstrap.php
treatPhpDocTypesAsCertain: false
customRulesetUsed: true
services:
-
class: \PHPStan\Rules\Properties\TypesAssignedToPropertiesRule
tags:
- phpstan.rules.rule
-
class: \PHPStan\Rules\Functions\ArrowFunctionReturnTypeRule
tags:
- phpstan.rules.rule
-
class: \PHPStan\Rules\Functions\ClosureReturnTypeRule
tags:
- phpstan.rules.rule
-
class: \PHPStan\Rules\Functions\ReturnTypeRule
tags:
- phpstan.rules.rule
-
class: \PHPStan\Rules\Methods\ReturnTypeRule
tags:
- phpstan.rules.rule
......@@ -110,7 +110,11 @@ public function getBody(): string
$useCaptcha = false;
$isCaptchaInvisible = false;
if (QUI\FrontendUsers\Utils::isCaptchaModuleInstalled()) {
if (
QUI\FrontendUsers\Utils::isCaptchaModuleInstalled()
&& class_exists('QUI\Captcha\Controls\CaptchaDisplay')
&& class_exists('QUI\Captcha\Handler')
) {
$Captcha = new QUI\Captcha\Controls\CaptchaDisplay();
$jsRequired = QUI\Captcha\Handler::requiresJavaScript();
$useCaptcha = boolval($registrationSettings['useCaptcha']);
......@@ -120,6 +124,7 @@ public function getBody(): string
if (
class_exists('QUI\Captcha\Modules\Google')
&& class_exists('QUI\Captcha\Modules\GoogleInvisible\Control')
&& $Default->getType() === QUI\Captcha\Modules\GoogleInvisible\Control::class
) {
$Engine->assign('googleSideKey', QUI\Captcha\Modules\Google::getSiteKey());
......
......@@ -10,6 +10,8 @@
use QUI\Countries\Controls\Select as CountrySelect;
use QUI\Exception;
use function class_exists;
/**
* Class EMail
*
......@@ -99,7 +101,11 @@ public function getBody(): string
$jsRequired = false;
$useCaptcha = false;
if (QUI\FrontendUsers\Utils::isCaptchaModuleInstalled()) {
if (
QUI\FrontendUsers\Utils::isCaptchaModuleInstalled()
&& class_exists('QUI\Captcha\Controls\CaptchaDisplay')
&& class_exists('QUI\Captcha\Handler')
) {
$Captcha = new QUI\Captcha\Controls\CaptchaDisplay();
$jsRequired = QUI\Captcha\Handler::requiresJavaScript();
$useCaptcha = boolval($registrationSettings['useCaptcha']);
......
......@@ -7,12 +7,13 @@
namespace QUI\FrontendUsers\Registrars\Email;
use QUI;
use QUI\Captcha\Handler as CaptchaHandler;
use QUI\Exception;
use QUI\FrontendUsers;
use QUI\FrontendUsers\InvalidFormField;
use QUI\Utils\Security\Orthos;
use function class_exists;
/**
* Class Email\Registrar
*
......@@ -220,7 +221,7 @@ public function validate(): array
]);
}
if (!CaptchaHandler::isResponseValid($captchaResponse)) {
if (class_exists('QUI\Captcha\Handler') && !QUI\Captcha\Handler::isResponseValid($captchaResponse)) {
throw new FrontendUsers\Exception([
$lg,
$lgPrefix . 'captcha_invalid_response'
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren