[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 http://php.net/manual/en/function.filter-input.php)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
http://ww.wp.xz.cn/extend/plugins/wordpress-mu-domain-mapping/
The topic ‘[Plugin: WordPress MU Domain Mapping] undefined GETs’ is closed to new replies.