[wp-trac] [WordPress Trac] #30875: enforce integers in add_filter priority
WordPress Trac
noreply at wordpress.org
Thu Jan 1 18:16:38 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 valendesigns):
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.
Well, at the very least I've created some tests. I've uploaded a new patch
that doesn't change the expected or perceived behavior in any way. it does
however, return false when `$priority` is set to an array or object. I
added that because I was getting an 'Illegal offset type' thrown in the
console when I tried to assert they were false.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30875#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list