[wp-trac] [WordPress Trac] #27003: Introduce wp_get_network() and begin cleanup of multisite load

WordPress Trac noreply at wordpress.org
Fri Feb 14 11:56:27 UTC 2014


#27003: Introduce wp_get_network() and begin cleanup of multisite load
--------------------------------------------------+------------------------
 Reporter:  jeremyfelt                            |       Owner:
     Type:  enhancement                           |      Status:  new
 Priority:  normal                                |   Milestone:  3.9
Component:  Bootstrap/Load                        |     Version:  trunk
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:  multisite
--------------------------------------------------+------------------------

Comment (by TobiasBg):

 [attachment:27003-docs-fix.patch] corrects inline docs param types and
 name.

 Then, in [https://core.trac.wordpress.org/browser/trunk/src/wp-includes
 /ms-load.php?rev=27178#L252 this line], we allow `$networks` to be an
 empty array (happens, in theory, if there are no rows in `$wpdb->site`),
 but in [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/ms-
 load.php?rev=27178#L253 the next line] we access `$networks[0]`. I'm not
 sure how likely that is to happen in practice, but we should probably
 avoid it to not trigger a notice.

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


More information about the wp-trac mailing list