Commit efd7ac42 authored by soxofaan's avatar soxofaan

#545526: added isset check to avoid undefined indices errors

parent c47a2626
......@@ -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);
......
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