WordPress.org

Make WordPress Core

Changeset 36561


Ignore:
Timestamp:
02/17/2016 08:49:29 PM (2 years ago)
Author:
jeremyfelt
Message:

Multisite: Avoid a PHP Notice when saving a site address without a path.

Props kjbenk.
Fixes #35631.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-info.php

    r36171 r36561  
    7878        }
    7979        $update_parsed_url = parse_url( $blog_data['url'] );
     80
     81        // If a path is not provided, use the default of `/`.
     82        if ( ! isset( $update_parsed_url['path'] ) ) {
     83            $update_parsed_url['path'] = '/';
     84        }
    8085
    8186        $blog_data['scheme'] = $update_parsed_url['scheme'];
Note: See TracChangeset for help on using the changeset viewer.