From f531959fa286b01cc60608cce2d2b7734c771481 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 30 Mar 2016 02:21:57 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@37092 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 2885fd4dc9..f4dfaeedc2 100644 --- a/src/wp-includes/theme.php +++ b/src/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,