[wp-trac] [WordPress Trac] #55161: Full Site Editing: PHP Warning with incomplete presets

WordPress Trac noreply at wordpress.org
Mon Feb 14 10:24:55 UTC 2022


#55161: Full Site Editing: PHP Warning with incomplete presets
----------------------------+-----------------------------
 Reporter:  jeherve         |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Editor          |    Version:
 Severity:  normal          |   Keywords:  has-patch
  Focuses:  administration  |
----------------------------+-----------------------------
 In some scenarios, especially on sites that started experimenting with
 Full Site Editing with the Gutenberg plugin when the feature was still
 under development, and then switched to WordPress 5.9, one may run into
 the following warning on the frontend, when using a block-based theme:

 {{{
 Warning: Undefined array key "fontFamily" in /wp-includes/class-wp-theme-
 json.php on line 1093
 }}}

 I believe the attached patch should get rid of the warning.

 For reference, the warning was the following when using the Gutenberg
 plugin:

 {{{
 Warning: Undefined array key "fontFamily" in /wp-
 content/plugins/gutenberg/lib/compat/wordpress-5.9/class-wp-theme-json-
 gutenberg.php
 }}}

 Let me know if I should create this patch against
 {{{https://github.com/WordPress/gutenberg/blob/efafb0a561c8ef2e171e6cb6430c3dbc00709bc0/lib/compat/wordpress-5.9
 /class-wp-theme-json-5-9.php}}} instead.

 Thank you!

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


More information about the wp-trac mailing list