[wp-trac] [WordPress Trac] #26942: Unnecessary $sites count condition in multisite load process

WordPress Trac noreply at wordpress.org
Sun Jan 26 09:37:45 UTC 2014


#26942: Unnecessary $sites count condition in multisite load process
----------------------------+-----------------------------
 Reporter:  jeremyfelt      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  low             |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  3.0
 Severity:  minor           |   Keywords:  has-patch
  Focuses:  multisite       |
----------------------------+-----------------------------
 [https://mu.trac.wordpress.org/browser/trunk/wpmu-settings.php?rev=1422
 mu:1422] moved a check for single network vs multi-network into
 `wpmu_current_site()`. Existing code inside `wpmu_current_site()` intended
 for a `$sites` count of 1 become inaccessible.

 In [12921], the remaining count checks were consolidated into one, but the
 instance of `1 == count( $sites )` in that scenario is still not
 accessible.

 This doesn't hurt anything and the likelihood of this part of the function
 being reached is so extremely low. It does cause a double take. And made
 me investigate it.

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


More information about the wp-trac mailing list