Unverified Commit 09cecdab authored by git's avatar git Committed by wundo

Issue #2929153 by welly, gpbarga, wundo: Notice: Undefined index:...

Issue #2929153 by welly, gpbarga, wundo: Notice: Undefined index: #limit_validation_errors in Drupal\captcha\Element\Captcha::processCaptchaElement()
parent d76388cd
......@@ -87,7 +87,7 @@ class Captcha extends FormElement implements ContainerFactoryPluginInterface {
// Add JavaScript for general CAPTCHA functionality.
$element['#attached']['library'][] = 'captcha/base';
if ($form_state->getTriggeringElement() && is_array($form_state->getTriggeringElement()['#limit_validation_errors'])) {
if ($form_state->getTriggeringElement() && isset($form_state->getTriggeringElement()['#limit_validation_errors']) && is_array($form_state->getTriggeringElement()['#limit_validation_errors'])) {
// This is a partial (ajax) submission with limited validation. Do not
// change anything about the captcha element, assume that it will not
// update the captcha element, do not generate anything, which keeps the
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment