[wp-trac] [WordPress Trac] #44808: Creating subsite with un-trimmed space results in "Missing or invalid site address."

WordPress Trac noreply at wordpress.org
Thu Jun 20 13:56:57 UTC 2019


#44808: Creating subsite with un-trimmed space results in "Missing or invalid site
address."
--------------------------------+-----------------------------
 Reporter:  aubreypwd           |       Owner:  (none)
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Future Release
Component:  Networks and Sites  |     Version:  3.1
 Severity:  normal              |  Resolution:
 Keywords:  needs-patch         |     Focuses:  multisite
--------------------------------+-----------------------------
Changes (by jeremyfelt):

 * keywords:   => needs-patch
 * version:  4.9.8 => 3.1
 * milestone:  Awaiting Review => Future Release


Comment:

 Good catch, it makes sense to trim this before validation.

 @dharmin16 [attachment:"44808.patch"] looks like a good start, however the
 `trim()` should happen before validation rather than as a part of it. In
 the current form, the path is still saved with a space (e.g. `/path-name
 /`) in the database. This may mean using another variable to store
 `$blog['domain']` during validation.

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


More information about the wp-trac mailing list