[wp-trac] [WordPress Trac] #25308: wp_cache_set, wp_cache_add, set_transient should handle and notify on non-ints expirations
WordPress Trac
noreply at wordpress.org
Fri Sep 13 17:35:09 UTC 2013
#25308: wp_cache_set, wp_cache_add, set_transient should handle and notify on non-
ints expirations
------------------------------------+--------------------
Reporter: andreasnrb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Cache | Version: 3.6.1
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+--------------------
Comment (by nacin):
_doing_it_wrong() only fires a notice when WP_DEBUG. I just wonder at what
point would the vast majority of WordPress functions need to follow this
pattern. PHP is loosely typed, and so is most of WordPress — if it's
scalar, it's usually accepted for boolean and integer arguments, then
cast.
I doubt anyone is honestly "doing it wrong" here. At most, maybe they're
passing a numeric string? I don't think we need to be annoyed with that.
We can just cast it and move on.
"Currently plugin and theme developers pass strings and other types as
expirations" - any evidence for this to show just how bad things are?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25308#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list