[wp-trac] [WordPress Trac] #55241: Disabling "settings.color.duotone" within theme.json causes fatal error undefined variable $filter

WordPress Trac noreply at wordpress.org
Thu Feb 24 08:05:35 UTC 2022

#55241: Disabling "settings.color.duotone" within theme.json causes fatal error
undefined variable $filter
 Reporter:  aliakseyenkaihar       |       Owner:  audrasjb
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.9.2
Component:  Themes                 |     Version:  5.9.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch fixed-major  |     Focuses:

Comment (by azouamauriac):

 Replying to [comment:7 audrasjb]:
 > In [changeset:"52791" 52791]:
 > {{{
 > #!CommitTicketReference repository="" revision="52791"
 > Themes: Avoid undefined variable warning on `get_svg_filters()`.
 > This change fixes an undefined variable warning thrown when `duotone`
 color setting was set to null` in Block Themes `theme.json` file.
 > Follow-up to [52768].
 > Props aliakseyenkaihar, audrasjb, rafiahmedd.
 > Fixes #55241.
 > }}}

 The ''$filters'' was introduced here [52757] I think(please correct me if
 I'm wrong).

 But I don't really get why it put there, however I think it should not be
 removed from there until we understand all consequences of move it.

 What i'll suggest about the patch will be to leaving ''$filters'' at its
 place, and add the new initialization of this variable before the first
 loop ''for''(what is already done).

Ticket URL: <https://core.trac.wordpress.org/ticket/55241#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list