[wp-trac] [WordPress Trac] #57518: Undefined array key in widgets.php on line 919

WordPress Trac noreply at wordpress.org
Fri Jan 20 21:22:37 UTC 2023


#57518: Undefined array key in widgets.php on line 919
--------------------------+-----------------------------
 Reporter:  sageth        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 If you enable a plugin with a widget and then go to a page which does not
 display the widget (e.g. a Jetpack sitemap), you will receive an error
 similar to:
 PHP message: PHP Warning: Undefined array key "jetpack-search-filters-1"
 in /wp-includes/widgets.php on line 918
 PHP message: PHP Warning: Trying to access array offset on value of type
 null in /wp-includes/widgets.php on line 918" while reading response
 header from upstream, ...,
 request: "GET /attachment-sitemap4.xml HTTP/2.0", ...,
 referrer: "/sitemap_index.xml"

 The issue appears to occur with some plugins, but not all and adding a
 check to see if the variable is set first seems to address the issue.
 There is no identified front-end impact, however, this can quickly fill up
 logs depending on your site traffic and configuration.

 Testing can be completed by using Jetpack Search and Rank Math Sitemap xml
 files, though other combinations exist.

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


More information about the wp-trac mailing list