[wp-trac] [WordPress Trac] #27199: When site_name is missing from sitemeta table, it cannot be updated by Network > Settings screen

WordPress Trac noreply at wordpress.org
Tue Feb 25 18:13:35 UTC 2014


#27199: When site_name is missing from sitemeta table, it cannot be updated by
Network > Settings screen
--------------------------------+------------------------
 Reporter:  JPry                |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  3.9
Component:  Options, Meta APIs  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+------------------------

Comment (by JPry):

 Replying to [comment:3 jeremyfelt]:
 > Replying to [comment:2 jeremyfelt]:
 > > I wonder if we can replace all uses of `get_site_option( 'site_name'
 )` with `get_current_site_name()` instead, as that would use the fallback
 properly.
 >
 > In addition to the patch on this ticket, not instead. :)

 I think that could work, but there is something to consider: The
 `get_current_site_name()` function is expecting to receive the
 `$current_site` object, and it returns the modified object. This means we
 have two possible ways to approach this:

 * We could declare the global `$current_site` object first, and then pass
 it to `get_current_site_name()` every time it is called.
 * We could declare the global `$current_site` object inside the
 `get_current_site_name()` function, perhaps **only if** `$current_site` is
 not passed to the function.

 Jeremy, what do you think about those options?

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


More information about the wp-trac mailing list