[wp-trac] [WordPress Trac] #30875: enforce integers in add_filter priority

WordPress Trac noreply at wordpress.org
Thu Jan 1 22:04:08 UTC 2015


#30875: enforce integers in add_filter priority
------------------------------------------+------------------------------
 Reporter:  drrobotnik                    |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Plugins                       |     Version:  4.1
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch dev-feedback close  |     Focuses:
------------------------------------------+------------------------------

Comment (by drrobotnik):

 Replying to [comment:5 boonebgorges]:
 > [attachment:30875.4.diff] is not backward compatible. By rounding floats
 and by turning strings into 10, it creates a race condition where there
 was previously a determinate order (as dd32 put it, predictable though
 perhaps odd).
 >
 > Like #30862, this is a case where we're trying to solve a problem that
 does not exist. The ability to use non-integer values here is perhaps not
 an intended feature, and perhaps it should remain undocumented, but the
 fact that it exists is not a bug.

 @valendesigns, thanks for updating the patch.

 I'm having trouble accepting the backwards compatibility argument on this
 issue. At a certain point you're choosing backwards compatibility over the
 documentation and intended usage.

 Accept that anyone that's using this outside of an integer is doing it
 wrong purposefully. They'll need to take a moment to adjust it in for
 future releases or we automatically normalize their priority. The issue
 does exist and we're pre-empting it from becoming an issue by closing it
 here.

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


More information about the wp-trac mailing list