[wp-trac] [WordPress Trac] #44579: get_option() is type aware now (returns Integers as Integers)
WordPress Trac
noreply at wordpress.org
Mon Jul 16 12:24:21 UTC 2018
#44579: get_option() is type aware now (returns Integers as Integers)
--------------------------------+------------------------------
Reporter: gdespoulain | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: trunk
Severity: minor | Resolution:
Keywords: | Focuses: docs
--------------------------------+------------------------------
Comment (by gdespoulain):
Thanks for the insight @boonebgorges :)
I did some more unit testing with ''$wp_object_cache->flush()'' to
simulate the page reload and indeed, I can confirm the values are then
returned as strings.
It's a good idea to update the documentation in order to reflect this
behavior... but on the other hand, I'm a little disturbed by said
behavior...
Maybe it would be better that the return type stay consistent, whatever
the use case? So that it's more reliable?
Regards
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44579#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list