WordPress MU Domain Mapping
[resolved] Fix for PHP Notice: Undefined Index on Line 825 (2 posts)

  1. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    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.)


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic