WordPress.org

Make WordPress Core

Ticket #6890: patch-canonical-nohost.patch

File patch-canonical-nohost.patch, 407 bytes (added by thenlich, 10 years ago)
  • canonical.php

    old new  
    137137
    138138        // www.example.com vs example.com
    139139        $user_home = @parse_url(get_option('home'));
    140         $redirect['host'] = $user_home['host'];
     140        if ( isset($user_home['host']) )
     141                $redirect['host'] = $user_home['host'];
    141142
    142143        // Handle ports
    143144        if ( isset($user_home['port']) )