WordPress.org

Support

Support » Plugins and Hacks » WordPress MU Domain Mapping » [Resolved] [Plugin: WordPress MU Domain Mapping] Fix for PHP Notice: Undefined Index on Line 825

[Resolved] [Plugin: WordPress MU Domain Mapping] Fix for PHP Notice: Undefined Index on Line 825

  • Small fix for PHP notice generated on line 825 of domain-mapping.php. When the Plugin is installed/active, but no domains have been mapped, the following notice is thrown on wp-admin/network/plugins.php:

    Notice: Undefined index: 1 in [...]/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php on line 825

    Here is line 825:

    if( is_array( $maps[ $blog_id ] ) && count( $maps[ $blog_id ] ) ) {

    Just need to add an isset() to the conditional:

    if( isset( $maps[$blog_id] ) && is_array( $maps[ $blog_id ] ) && count( $maps[ $blog_id ] ) ) {

    (There may be a better way? But this worked for me to eliminate the notice.)

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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: WordPress MU Domain Mapping] Fix for PHP Notice: Undefined Index on Line 825’ is closed to new replies.
Skip to toolbar