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

Merge branch 'dev' into 'next'

Dev

See merge request !43
Übergeordnete 0b193b74 963503e7
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!44Next,!43Dev
Pipeline-Nr. 8055 bestanden
......@@ -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% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren