[wp-trac] [WordPress Trac] #48112: Undefinred $type_attr for TwentyTwenty When A Custom Background is Set

WordPress Trac noreply at wordpress.org
Mon Sep 23 20:02:01 UTC 2019


#48112: Undefinred $type_attr for TwentyTwenty When A Custom Background is Set
---------------------------+-----------------------
 Reporter:  davidbaumwald  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  5.3
Component:  Customize      |    Version:  trunk
 Severity:  normal         |   Keywords:  has-patch
  Focuses:                 |
---------------------------+-----------------------
 [46164] introduced a `type` attribute one the inline `<style>` tag when a
 custom background is defined in the Customizer.  This produces a notice:
 >Notice: Undefined variable: type_attr in wp-includes\theme.php on line
 1708

 The notice is thrown inline in the render, making the `<style>` tag
 malformed and not used.

 The attached patch moves the `$type_attr` assignment out of the
 conditional which is only evaluated in certain themes.

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


More information about the wp-trac mailing list