[wp-trac] [WordPress Trac] #27832: All sites automatically marked as archived after upgrade

WordPress Trac noreply at wordpress.org
Tue Oct 3 04:39:11 UTC 2017


#27832: All sites automatically marked as archived after upgrade
---------------------------------------+------------------------------
 Reporter:  pavelevap                  |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Networks and Sites         |     Version:  3.7
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:  multisite
---------------------------------------+------------------------------

Comment (by jeremyfelt):

 In [changeset:"41700"]:
 {{{
 #!CommitTicketReference repository="" revision="41700"
 Multisite: Use `%s` when building query for `archived` sites in
 `WP_Site_Query`.

 In [25548], the `archived` column in `wp_blogs` was changed from `ENUM` to
 `TINYINT` to match other status fields. When `WP_Site_Query` was written
 later, it used `%d` as a placeholder when formatting the archived status.

 It is possible that this query will fail for any installations that did
 not update the schema for `wp_blogs` as only single quoted values are
 accepted for the `ENUM` type. In this case, `'0'` or `'1'` rather than `0`
 or `1`.

 We can work around this and support both `ENUM` and `TINYINT` in the query
 by using the `%s` placeholder and casting the value with `absint()`.

 Props stephdau.
 Fixes #38856. See #27832.
 }}}

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


More information about the wp-trac mailing list