[wp-trac] [WordPress Trac] #32154: Don't upgrade global tables for utf8mb4

WordPress Trac noreply at wordpress.org
Fri Jul 3 05:27:01 UTC 2015


#32154: Don't upgrade global tables for utf8mb4
--------------------------+-----------------------
 Reporter:  ocean90       |       Owner:  dd32
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.2.3
Component:  Database      |     Version:  4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by johnjamesjacoby):

 Replying to [comment:13 dd32]:
 > The only places we currently use `can` is when the code is making a
 decision based on the permissions and versions it has available to it. So
 for example, If it checked that it has the `ALTER TABLE` permission, then
 I'd expect it to use `can`.
 I understand. But we do use `can` in many places, and don't use `should`
 yet. Are we purposely introducing a new naming convention we can juice and
 reuse elsewhere, or adjusting it because it sorta reads nicer to some
 people?

 > I don't think we should be explicit when not necessary
 We should be explicit, always.

 > There should be no strict checks on a boolean function
 Doesn't the Scrutinzer ticket suggests otherwise?

 > plugins should behave themselves and return the documented data.
 But they don't always, and WordPress can act responsibly to ensure global
 tables aren't accidentally updated because a plugin author made a boo boo.

 > There are no other cases (that I can see) where we use `return (bool)
 apply_filters()`.
 You are correct; we do not traditionally prevent return values of filters
 from doing terrible things in WordPress. We do occasionally in BuddyPress
 and almost always in bbPress, to guarantee the result being compared or
 requested is predictable, since plugins for plugins tend to have a lot of
 overlapping filters.

 Thanks for the quick reply.

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


More information about the wp-trac mailing list