Skip to content
Snippets Groups Projects
Commit efd7ac42 authored by soxofaan's avatar soxofaan
Browse files

#545526: added isset check to avoid undefined indices errors

parent c47a2626
No related branches found
Tags 8.x-1.0-alpha2
No related merge requests found
......@@ -111,7 +111,8 @@ function _captcha_update_captcha_session($captcha_sid, $solution) {
function _captcha_required_for_user($captcha_sid, $form_id) {
$captcha_session_status = db_result(db_query("SELECT status FROM {captcha_sessions} WHERE csid = %d", $captcha_sid));
$captcha_success_form_ids = (array)($_SESSION['captcha_success_form_ids']);
$captcha_success_form_ids = isset($_SESSION['captcha_success_form_ids']) ? (array)($_SESSION['captcha_success_form_ids']) : array();
switch (variable_get('captcha_persistence', CAPTCHA_PERSISTENCE_SHOW_ALWAYS)) {
case CAPTCHA_PERSISTENCE_SKIP_ONCE_SUCCESSFUL:
$captcha_persistence_status = (count($captcha_success_form_ids) > 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment