Getting Undefined Index Error
-
As far as is visible, the plugin is working fine. However, in the debug_log, I get a continuous notice about the following
[07-Jul-2022 14:46:30 UTC] PHP Notice: Undefined index: long_events in /home/——/public_html/wp-content/plugins/events-manager/widgets/em-calendar.php on line 55
Opening up the file, it looks to be correct, and I can’t find the problem.
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
//filter the new instance and replace blanks with defaults
$new_instance[‘title’] = (!isset($new_instance[‘title’])) ? $this->defaults[‘title’]:$new_instance[‘title’];
$new_instance[‘long_events’] = ($new_instance[‘long_events’] == ”) ? $this->defaults[‘long_events’]:$new_instance[‘long_events’];
$new_instance[‘category’] = ($new_instance[‘category’] == ”) ? $this->defaults[‘category’]:$new_instance[‘category’];
return $new_instance;
}I checked the settings but they appear to be the default. Any assistance would be appreciated. I have a couple errors to diagnose in my log and I’ve been putting this one off for a while since it wasn’t major, but would like to get it fixed.
- The topic ‘Getting Undefined Index Error’ is closed to new replies.