[wp-trac] [WordPress Trac] #32876: Wrong data type for term taxonomy ID variable
WordPress Trac
noreply at wordpress.org
Mon Jul 13 08:05:40 UTC 2015
#32876: Wrong data type for term taxonomy ID variable
-------------------------------------------------+-------------------------
Reporter: ipm-frommen | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Taxonomy | Review
Severity: normal | Version: 2.3
Keywords: has-patch needs-testing 2nd-opinion | Resolution:
| Focuses:
-------------------------------------------------+-------------------------
Comment (by ipm-frommen):
@johnbillion that's right. If someone expects the value to be a numerical
string and performs strict checks, this might lead to unexpected results.
However, as the value/type is told (as per PHPDoc) to be an `int` (all
around the core where it is being used, that is), I would consider casting
the value to `int` the right choice (and not changing all the PHPDoc
blocks).
And by the way, a not-working strict check is exactly what made me create
this ticket. ;)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32876#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list