PHP Error Log
-
Hi Mike,
Awesome plugin!
A was reviewing clients error logs, and noticed the following error appearing in one of the sites:
PHP Notice: Undefined index: si_contact_subject_ID in wp-content/plugins/si-contact-form/si-contact-form-process.php on line 239
Here is the block of code from that file (line 3 is the error):
}else{ // posted subject select input $sid = $this->ctf_clean_input($_POST['si_contact_subject_ID']); if(empty($sid) && $si_contact_opt['subject_type'] == 'required') { $this->si_contact_error = 1; $fsc_error_message['subject'] = ($si_contact_opt['error_subject'] != '') ? $si_contact_opt['error_subject'] : __('Selecting a subject is required.', 'si-contact-form'); } else if (empty($subjects) || !isset($subjects[$sid])) { $this->si_contact_error = 1; $fsc_error_message['subject'] = __('Requested subject not found.', 'si-contact-form'); } else { $subject = $this->ctf_clean_input($subjects[$sid]); } }
I’m not entirely sure, but it seems to be happening when a contact form is submitted without a subject line.
Perhaps checking if
$_POST['si_contact_subject_ID']
isset first, will alleviate the notice.Thanks Mike!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP Error Log’ is closed to new replies.