[Plugin: WordPress MU Domain Mapping] Warnings when in WordPress debug mode (code patch)
-
Hi,
The WordPress MU Domain Mapping plugin produces warnings / errors when “wp-config.php” has “WP_DEBUG” set to “true”.
I require WP_DEBUG to be true as I am developing multiple plug-ins for a WordPress site.
I have a code patch for the current TRUNK version http://plugins.trac.ww.wp.xz.cn/browser/wordpress-mu-domain-mapping/trunk?rev=453841.
Index: domain_mapping.php =================================================================== --- domain_mapping.php (revision 453847) +++ domain_mapping.php (working copy) @@ -3,7 +3,7 @@ Plugin Name: WordPress MU Domain Mapping Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/ Description: Map any blog on a WordPress website to another domain. -Version: 0.5.4.2 +Version: 0.5.4.2 (+ @DeanMarkTaylor bug fixes for debug mode warnings). Author: Donncha O Caoimh Author URI: http://ocaoimh.ie/ */ @@ -379,7 +379,7 @@ exit; break; } - } elseif( $_GET[ 'action' ] == 'delete' ) { + } elseif( isset($_GET[ 'action' ]) && $_GET[ 'action' ] == 'delete' ) { $domain = $wpdb->escape( $_GET[ 'domain' ] ); if ( $domain == '' ) { wp_die( __( "You must enter a domain", 'wordpress-mu-domain-mapping' ) ); @@ -455,7 +455,7 @@ $domains = $wpdb->get_results( "SELECT * FROM {$wpdb->dmtable} WHERE blog_id = '{$wpdb->blogid}'", ARRAY_A ); if ( is_array( $domains ) && !empty( $domains ) ) { $orig_url = parse_url( get_original_url( 'siteurl' ) ); - $domains[] = array( 'domain' => $orig_url[ 'host' ], 'path' => $orig_url[ 'path' ], 'active' => 0 ); + $domains[] = array( 'domain' => $orig_url[ 'host' ], 'path' => (empty($orig_url[ 'path' ]) ? '' : $orig_url[ 'path' ]), 'active' => 0 ); echo "<h3>" . __( 'Active domains on this blog', 'wordpress-mu-domain-mapping' ) . "</h3>"; echo '<form method="POST">'; echo "<table><tr><th>" . __( 'Primary', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Domain', 'wordpress-mu-domain-mapping' ) . "</th><th>" . __( 'Delete', 'wordpress-mu-domain-mapping' ) . "</th></tr>\n"; @@ -641,7 +641,7 @@ } function redirect_login_to_orig() { - if ( !get_site_option( 'dm_remote_login' ) || $_GET[ 'action' ] == 'logout' || isset( $_GET[ 'loggedout' ] ) ) { + if ( !get_site_option( 'dm_remote_login' ) || (isset($_GET[ 'action' ]) && $_GET[ 'action' ] == 'logout') || isset( $_GET[ 'loggedout' ] ) ) { return false; } $url = get_original_url( 'siteurl' );I was wondering if this patch could be “officially” applied to the plugin’s repository?
It would also be nice to see an official plugin update containing these changes. Is this likely to occur? What is the process for a release?
Cheers,
Dean.http://ww.wp.xz.cn/extend/plugins/wordpress-mu-domain-mapping/
The topic ‘[Plugin: WordPress MU Domain Mapping] Warnings when in WordPress debug mode (code patch)’ is closed to new replies.