Support » Plugin: WordPress MU Domain Mapping » [Plugin: WordPress MU Domain Mapping] undefined GETs

  • in redirect_login_to_orig it requests directly the $_GET[‘action’] this will work but is not desired:

    a) it will trigger a php notics “Notice: Undefined index: action in /opt/htdocs/html/wp-content/mu-plugins/domain_mapping.php on line 647” for users who have php turned on to show notices
    b) it is no longer preferred to query $_GET directly but use filter_input(INPUT_GET, ‘action’, FILTER_SANITIZE_STRING); instead (see

    e.g. replacing it with:

    $action = filter_input(INPUT_GET,  'action', FILTER_SANITIZE_STRING);
    	if ( !get_site_option( 'dm_remote_login' ) || $action == 'logout' || isset( $_GET[ 'loggedout' ] ) ) {
    		return false;

    removes the php notice

    You could also use

    $action = filter_input(INPUT_GET, 'action', FILTER_CALLBACK, $options);

    to callback to the list of available actions

    now for the “loggedout” you could use FILTER_NULL_ON_FAILURE instead

Viewing 1 replies (of 1 total)
  • Plugin Author Ron Rennick


    Thanks for reporting the warning 🙂 We’ll probably stick to an isset() check to clear the warning since that’s what we;ve used throughout the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress MU Domain Mapping] undefined GETs’ is closed to new replies.