[wp-trac] [WordPress Trac] #34450: get_id_from_blogname returns false if the main domain starts with www.

WordPress Trac noreply at wordpress.org
Tue Sep 27 17:56:55 UTC 2016


#34450: get_id_from_blogname returns false if the main domain starts with www.
--------------------------------------+------------------------
 Reporter:  igmoweb                   |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.7
Component:  Networks and Sites        |     Version:  4.3.1
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  multisite
--------------------------------------+------------------------
Changes (by jeremyfelt):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38658"]:
 {{{
 #!CommitTicketReference repository="" revision="38658"
 Multisite: Handle `get_id_from_blogname()` lookups when the network domain
 has `www.`.

 Previously, if a network's domain started with `www.` in a subdomain
 configuration, a slug lookup with `get_id_from_blogname()` would not match
 an existing site. A similar lookup in a subdirectory configuration would
 work fine.

 This strips `www.` from the network's domain in a subdomain configuration
 during the lookup and returns the site as expected.

 Adds tests which would previously fail in a subdomain configuration, but
 now pass in both configurations.

 Props igmoweb, flixos90.
 Fixes #34450.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34450#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list