[wp-trac] [WordPress Trac] #37615: Do not pass `$site` and `$network` by reference in `get_*()` functions

WordPress Trac noreply at wordpress.org
Tue Aug 9 16:23:32 UTC 2016


#37615: Do not pass `$site` and `$network` by reference in `get_*()` functions
--------------------------------+-------------------------
 Reporter:  flixos90            |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  4.6
Component:  Networks and Sites  |    Version:  trunk
 Severity:  normal              |   Keywords:  needs-patch
  Focuses:  multisite           |
--------------------------------+-------------------------
 In `get_site()`, the `$site` parameter is passed by reference, which
 doesn't make a lot of sense. Same for the `$network` parameter in
 `get_network()`. Objects are passed by reference anyway, but passing for
 example the ID by reference could possibly lead to unexpected results.

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


More information about the wp-trac mailing list