Prevent PHP Warnings when using Custom Logo with no params

The parsing of defaults assumes that $args will be an array. This solves it for Custom Logo the same way it is solved for custom-header and custom-background.

Props obenland.
Fixes #36332.


Built from https://develop.svn.wordpress.org/trunk@37092


git-svn-id: http://core.svn.wordpress.org/trunk@37059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2016-03-30 02:22:26 +00:00
parent 9a16bfb5dc
commit c1d684383c
2 changed files with 4 additions and 1 deletions

View File

@ -1560,6 +1560,9 @@ function add_theme_support( $feature ) {
break;
case 'custom-logo':
if ( ! is_array( $args ) ) {
$args = array( 0 => array() );
}
$defaults = array(
'width' => null,
'height' => null,

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-RC1-37091';
$wp_version = '4.5-RC1-37092';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.