Commit bcfb82de authored by wundo's avatar wundo

#153395: Added warn message when challenge module fails. Thans soxofaan

parent 6c033e80
......@@ -191,6 +191,14 @@ function captcha_form_alter($form_id, &$form) {
$challenge = explode('/',$captcha_type);
$result = module_invoke($challenge[0], 'captcha', 'generate', $challenge[1]);
if (!$result) {
//The user selected module returned nothing, maybe it is disabled or it's wrong, we should watchdog that and the quit.
t('Problems when trying to retrieve captcha %challenge challenge from %module',
array('%challenge' => $challenge[1], '%module' => $challenge[0])),
$form = array_merge($form,$result['form']);
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