Make WordPress Core

Ticket #35631: 35631.2.diff

File 35631.2.diff, 662 bytes (added by kjbenk, 9 years ago)

Patch v2 to set the path? index to "/" if not set.

  • wp-admin/network/site-info.php

    diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php
    index 50f287d..5497743 100644
    a b if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) { 
    7878                }
    7979                $update_parsed_url = parse_url( $blog_data['url'] );
    8080
     81                // Check if the URL path is valid, if not then make it "/"
     82
     83                if ( ! isset( $update_parsed_url['path'] ) ) {
     84                        $update_parsed_url['path'] = "/";
     85                }
     86
    8187                $blog_data['scheme'] = $update_parsed_url['scheme'];
    8288                $blog_data['domain'] = $update_parsed_url['host'];
    8389                $blog_data['path'] = $update_parsed_url['path'];