[wp-trac] [WordPress Trac] #38825: wp_get_post_revisions default $args value
WordPress Trac
noreply at wordpress.org
Wed Nov 16 15:14:21 UTC 2016
#38825: wp_get_post_revisions default $args value
-------------------------------+------------------------------
Reporter: natostanco | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Revisions | Version: 2.6
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by ocean90):
* keywords: => reporter-feedback
* version: trunk => 2.6
Comment:
Hello @natostanco, do you have some code which is currently failing for
you? Because of the `wp_parse_args()` call `$args` should never be `null`.
{{{#!php
<?php
$args = null;
$defaults = [ 'foo' => 'bar' ];
$args = wp_parse_args( $args, $defaults );
var_dump( $args ); // array(1) { ["foo"]=> string(3) "bar" }
}}}
Introduced in [7987].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38825#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list