0

Notice: Undefined index: Zumpito_event_full_day in /home2/michael/public_html/domainname.com/wp-content/themes/themename/included/main.php on line 246

Warning: Cannot modify header information - headers already sent by (output started at /home2/michael/public_html/domain.com/wp-content/themes/themename/included/main.php:246) in/home2/michael/public_html/domainname.com/wp-admin/post.php on line 197

Warning: Cannot modify header information - headers already sent by (output started at /home2/michael/public_html/domainname.com/wp-content/themes/themename/included/main.php:246) in/home2/michael/public_html/domainname.com/wp-includes/pluggable.php on line 1228

The Code on Line#246 is this -

$arr['Zumpito_event_full_day'] = ( $_POST['Zumpito_event_full_day'] ) ? esc_attr( $_POST['Zumpito_event_full_day]) : '';    

Actually to an extent I found the solution here - https://wordpress.org/support/topic/errors-notice-undefined-index-and-cannot-modify-header?replies=5

But i am a beginner so could not implement it in my case. Can some one specifically guide me how should I use Isset function in my case Here.

1
  • I forget to mention that when I set debug to False - define('WP_DEBUG', false); These notices/warning disappears, but i have to eliminate theme in Debug Mode Enable or set to True.
    – WordCent
    Jan 30, 2016 at 15:53

1 Answer 1

1
$arr['Zumpito_event_full_day'] = isset( $_POST['Zumpito_event_full_day'] ) ? esc_attr( $_POST['Zumpito_event_full_day]) : ''; 

this should solve your first notice

explanation is this in the link given by you

1
  • Thanks It was simple as soon as I implemented this the 2nd Notice also disappeared. Thank you so much from last 2-3 Hours I was moving from blogs to different forums, but was unable to implement isset correctly in my case. you made my day. Thank you so Much.
    – WordCent
    Jan 30, 2016 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.