WordPress.org

Support

Support » Plugins and Hacks » Enabling WP_DEBUG Undefined index 'notice'

Enabling WP_DEBUG Undefined index 'notice'

  • I had enabled WP_DEBUG to sniff out a problem with a different plug-in, and I got a PHP “Notice” log message from your plug-in.

    Notice: Undefined index: vmenuwidget-2 in /home/user/folder/wp-content/plugins/wp-widget-cache/widget-cache.php on line 509

    Line 509 looks like this:
    $wc_value=intval($wc_options[$id]);

    It just needs an ISSET() before like this:

    if ( isset( $wc_options[$id] ) )
    		{
    			$wc_value=intval($wc_options[$id]);
    		} else { $wc_value = 0; }

    Just a quick fix for you. 🙂

    http://wordpress.org/extend/plugins/wp-widget-cache/

  • The topic ‘Enabling WP_DEBUG Undefined index 'notice'’ is closed to new replies.