WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
New release notice (2 posts)

  1. saintron
    Member
    Posted 1 year ago #

    Hi, I'm a PHP noob and I hope this post formats correctly.

    When I map a domain and leave the Primary box unchecked, I receive the following warning: Notice: Undefined index: active in C:\mysites\workspace\wp-content\plugins\wordpress-mu-domain-mapping\domain_mapping.php on line 152

    This is the code:
    if ( $_POST[ 'orig_domain' ] == '' ) { $wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtable} ( blog_id, domain, active ) VALUES ( %d, %s, %d )", $_POST[ 'blog_id' ], $domain, $_POST[ 'active' ] ) );
    echo "<p>" . __( 'Domain Add', 'wordpress-mu-domain-mapping' ) . "</p>";
    } else { $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->dmtable} SET blog_id = %d, domain = %s, active = %d WHERE domain = %s", $_POST[ 'blog_id' ], $domain, $_POST[ 'active' ], $_POST[ 'orig_domain' ] ) );
    echo "<p>" . __( 'Domain Updated', 'wordpress-mu-domain-mapping' ) . "</p>";
    }

    $POST[ 'active' ] will be blank since the box isn't checked and I'm not sure how to fix it. Thanks.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    thanks for reporting that. I'll put it on the list.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.