Minor Error Message in Dashboard & Fix
-
If you’re seeing the following error message in your dashboard
Notice: Undefined index: action in wp-content/plugins/hide-login/hide-login.php on line 98
Here is a solution. The problem is due to the plugin looking for a post variable called action. As no post variables are available when logging into the dashboard, we need to change this line from:
if( $_POST['action'] == 'hide_login_update' )
to
if( isset ( $_POST['action']) && $_POST['action'] == 'hide_login_update' )
This checks to first see if the action variable exists in the post array and then if it is set to ‘hide_login_update’. If one or both return false, the conditions inside the if loop will not run. Since the function is for updating options and we are not on the options page anyways, this is good. This will fix the issue for you and remove the error message.
- The topic ‘Minor Error Message in Dashboard & Fix’ is closed to new replies.