Commit 09d82c37 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1697522 by josebc: Fixed Notice: Undefined index: #title in...

Issue #1697522 by josebc: Fixed Notice: Undefined index: #title in clientside_validation_regular() in forms with captcha.
parent a6452038
......@@ -211,7 +211,7 @@ function clientside_validation_regular($form_id, $element, &$js_rules, $form_sta
case 'captcha':
$settings = clientside_validation_settings_current_form();
if ($settings['validate_options']['captcha']) {
$title = _clientside_validation_set_title($element['captcha_widgets']['captcha_response']['#title']);
$title = _clientside_validation_set_title(isset($element['captcha_widgets']['captcha_response']['#title']) ? $element['captcha_widgets']['captcha_response']['#title'] : $element['#name']);
$message = t('Wrong answer for !title', array('!title' => $title));
$case_sensitive = strpos($element['#captcha_validate'], 'insensitive') === FALSE;
_clientside_validation_set_captcha($element['captcha_widgets']['captcha_response']['#name'], $title, $element['#captcha_validate'], $js_rules, $message);
......
Supports Markdown
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