[wp-trac] [WordPress Trac] #60800: Twenty Twenty-One: prevent PHP 8 fatal error from non-string in $tags_list (was: Fix Potential PHP 8 Fatal Error in Twenty Twenty-One)

WordPress Trac noreply at wordpress.org
Mon Mar 18 17:05:39 UTC 2024


#60800: Twenty Twenty-One: prevent PHP 8 fatal error from non-string in $tags_list
----------------------------------------+---------------------
 Reporter:  josephscott                 |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.6
Component:  Bundled Theme               |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+---------------------
Changes (by sabernhardt):

 * keywords:  needs-patch => needs-patch good-first-bug


Comment:

 Thanks for the report!

 Other default themes have checked for `WP_Error` with this condition:
 `if ( $tags_list && ! is_wp_error( $tags_list ) )`

 Both lines 113 and 155 would need updating in `template-tags.php`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60800#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list