WP_DEBUG Notice in plugin

KFUM Elite
Expert
Friendly Neighbour
258
#274

Enabling WP_DEBUG gives the following notice from this plugin:

Notice: Undefined index: key in /kfuk-kfum-dev.fyrkantigt.se/wp-content/plugins/post-indexer/post-indexer.php on line 41

I think the easiest way to solve this is to change the offending code to:

//check for activating
if (isset($_GET['key'])) {
    if ($_GET['key'] == '' || $_GET['key'] === ''){
        add_action('admin_head', 'post_indexer_make_current');
    }
}
(0)