[wp-trac] [WordPress Trac] #36332: Custom Logo: PHP warnings in add_theme_support
WordPress Trac
noreply at wordpress.org
Fri Mar 25 17:56:42 UTC 2016
#36332: Custom Logo: PHP warnings in add_theme_support
--------------------------+-------------------
Reporter: obenland | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5
Component: Themes | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-------------------
From the support forums: https://wordpress.org/support/topic/custom-logo-
with-no-args-causing-php-warnings
Hi,
I'm testing the new WP4.5 development releases. Since current
4.5-RC1-37079 update I get these PHP warnings:
{{{ #!php
Warning: array_intersect_key(): Argument #1 is not an array in /srv/www
/wordpress-default/wp-includes/theme.php on line 1570`
Warning: Cannot use a scalar value as an array in /srv/www/wordpress-
default/wp-includes/theme.php on line 1570
Warning: Cannot use a scalar value as an array in /srv/www/wordpress-
default/wp-includes/theme.php on line 1574
Warning: Cannot use a scalar value as an array in /srv/www/wordpress-
default/wp-includes/theme.php on line 1575
}}}
I was able to trace these down to `add_theme_support( 'custom-logo' );`.
When I use it in plain with no additional args, the PHP warnings above are
thrown.
If I set custom logo with args, it works fine:
{{{ #!php
add_theme_support( 'custom-logo', array(
'height' => 160,
'width' => 160,
'flex-height' => true,
'flex-width' => true,
) );
}}}
Is it required to set the args? Shouldn't it work without the args? What
happens if no args are passed, will it take the full size of the uploaded
image?
Thanks for addressing this issue!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36332>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list