[wp-trac] [WordPress Trac] #54682: PHP Notice when adding 'custom_header' support to block theme

WordPress Trac noreply at wordpress.org
Wed Dec 22 20:48:09 UTC 2021


#54682: PHP Notice when adding 'custom_header' support to block theme
--------------------------+-----------------------------
 Reporter:  afragen       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  major         |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------------
 When adding `add_theme_support( 'custom_header' );` to a block theme in
 5.9-beta a PHP warning is thrown on `wp-admin/menu.php:231` as
 `$customize_url` hasn't been defined.

 As `$customize_url` is defined inside a conditional that may not fire and
 is unset about 20 lines down the code, it should be defined outside of the
 conditional.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54682>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list