[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 13:21:12 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:  Awaiting Review
Component:  General      |    Version:  3.6.1
 Severity:  normal       |   Keywords:  dev-feedback
-------------------------+-----------------------------
 Currently plugin and theme developers pass strings and other types as
 expirations to the wp_cache_set, wp_cache_add, set_transient instead of
 the int that is required.
 This causes issues when one uses object-cache.php drop in which connects
 to APC or other caching backends.

 There should be stricter control of int values in these functions.
 Typecasting to ints and a wrong param type notice/warning. Preferably
 warning so plugin/theme developers are made aware of their wrong usage of
 the functions.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25308>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list