[wp-trac] [WordPress Trac] #34941: Make the main bootstrap process in ms-settings.php testable

WordPress Trac noreply at wordpress.org
Wed Dec 9 18:23:14 UTC 2015


#34941: Make the main bootstrap process in ms-settings.php testable
----------------------------+-----------------------
 Reporter:  jeremyfelt      |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  4.5
Component:  Bootstrap/Load  |    Version:
 Severity:  normal          |   Keywords:  has-patch
  Focuses:  multisite       |
----------------------------+-----------------------
 One of the harder things to test right now in multisite is the bootstrap
 behavior. We have a hobbled together process right now that sets up a new
 "request" and re-includes `ms-settings.php` before checking the status of
 `$current_blog` and `$current_site`. This works for many configurations,
 but isn't useful when catching a failed scenario that results in a
 redirect or `ms_not_installed()`.

 We can pull most of this code out into a new function, `ms_bootstrap()` or
 similar, that handles the domain and path and returns the possible
 actions. From my first pass, I've landed on `true` for when a site and
 network are found, `false` for when a site or network is not found, and
 `URL string` for when a request needs to be immediately redirected
 elsewhere.

 I'm attaching an initial patch to start work on this. Once a version of it
 is in, we'll be able to better test a ticket like #17376.

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


More information about the wp-trac mailing list