Commit c7a4d73b authored by soxofaan's avatar soxofaan

added check to prevent "notice: Trying to get property of non-object ..." error message

parent 10b18e81
......@@ -422,7 +422,7 @@ function captcha_form_alter(&$form, $form_state, $form_id) {
return;
}
$captcha_point = db_fetch_object($result);
if (!$captcha_point->type) {
if (!$captcha_point || !$captcha_point->type) {
return;
}
......@@ -519,7 +519,7 @@ function captcha_form_alter(&$form, $form_state, $form_id) {
return;
}
$captcha_point = db_fetch_object($result);
if ($captcha_point->type) {
if ($captcha_point && $captcha_point->type) {
$form['captcha'] = array(
'#type' => 'item',
'#title' => t('CAPTCHA administration'),
......
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