[wp-trac] [WordPress Trac] #36931: wp_upload_dir caches calls with default arguments separately from their explicit equivalent
WordPress Trac
noreply at wordpress.org
Thu Sep 15 04:09:50 UTC 2016
#36931: wp_upload_dir caches calls with default arguments separately from their
explicit equivalent
--------------------------------------+------------------------------
Reporter: stephenharris | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by joemcgill):
@stephenharris Thanks for the report.
I'd like to see @azaozz's feedback on this since he did most of the work
on [36565].
Your explanation and patch both make sense, though I'm a bit uneasy about
essentially forcing an undocumented default value for the `$time`
parameter. Also, there is a slight difference in the way
`_wp_upload_dir()` calculates the time string if it's set to `null`, using
`current_time( 'mysql' )`. It would probably be best to remain consistent
between these two functions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36931#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list