From c1d684383c84dbc919c3b46a0821d10da17ea6a7 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 30 Mar 2016 02:22:26 +0000 Subject: [PATCH] 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 --- wp-includes/theme.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 2885fd4dc9..f4dfaeedc2 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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, diff --git a/wp-includes/version.php b/wp-includes/version.php index 3849f8a12b..359ca8e493 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.