[wp-trac] [WordPress Trac] #36323: home_url returns url with wrong scheme

WordPress Trac noreply at wordpress.org
Fri Mar 25 02:40:23 UTC 2016


#36323: home_url returns url with wrong scheme
--------------------------+-----------------------------
 Reporter:  Gerkin        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Permalinks    |    Version:  4.4.2
 Severity:  normal        |   Keywords:
  Focuses:  multisite     |
--------------------------+-----------------------------
 Hello,

 I have a multisite with HTTPS on all subsites. When using
 {{{
 home_url( '/' );
 }}}
 , on a subsite page, logged in user got a https url, when anonymous got
 just http.

 In the track, it seems that the error comes from those lines...
 {{{#!php
 2963            if ( ! in_array( $scheme, array( 'http', 'https',
 'relative' ) ) ) {
 2964                    if ( is_ssl() && ! is_admin() && 'wp-login.php'
 !== $pagenow )
 2965                            $scheme = 'https';
 2966                    else
 2967                            $scheme = parse_url( $url, PHP_URL_SCHEME
 );
 2968            }
 }}}
 ...

 Thank you for your time.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36323>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list