Skip to content

Commit f0ec603

Browse files
committed
Saving progress on AccountControllerTest
1 parent 2e0489c commit f0ec603

2 files changed

Lines changed: 629 additions & 2 deletions

File tree

app/sprinkles/account/src/Controller/AccountController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ public function profile(Request $request, Response $response, $args)
822822

823823
// Check that locale is valid
824824
$locales = $config->getDefined('site.locales.available');
825-
if (!array_key_exists($data['locale'], $locales)) {
825+
if (isset($data['locale']) && !array_key_exists($data['locale'], $locales)) {
826826
$ms->addMessageTranslated('danger', 'LOCALE.INVALID', $data);
827827
$error = true;
828828
}
@@ -950,7 +950,7 @@ public function register(Request $request, Response $response, $args)
950950
// Check captcha, if required
951951
if ($config['site.registration.captcha']) {
952952
$captcha = new Captcha($this->ci->session, $this->ci->config['session.keys.captcha']);
953-
if (!$data['captcha'] || !$captcha->verifyCode($data['captcha'])) {
953+
if (!isset($data['captcha']) || !$captcha->verifyCode($data['captcha'])) {
954954
$ms->addMessageTranslated('danger', 'CAPTCHA.FAIL');
955955
$error = true;
956956
}

0 commit comments

Comments
 (0)