[wp-trac] [WordPress Trac] #51956: Fatal error with PHP8 in header link RSS feed on dashboard widget

WordPress Trac noreply at wordpress.org
Sat Dec 12 16:31:46 UTC 2020


#51956: Fatal error with PHP8 in header link RSS feed on dashboard widget
----------------------------+-----------------------
 Reporter:  NicolasKulka    |       Owner:  (none)
     Type:  defect (bug)    |      Status:  assigned
 Priority:  high            |   Milestone:  5.6.1
Component:  Widgets         |     Version:
 Severity:  critical        |  Resolution:
 Keywords:  php8 has-patch  |     Focuses:  rest-api
----------------------------+-----------------------

Comment (by hellofromTonya):

 Using the Dashboard (using the custom widget by the reporter) and front-
 end with the mu-plugin code Ian provided:

 - before: fatal error in the Dashboard and front-end as well as in
 `debug.log`
 - after `51056.diff`: no fatal error and works as expected
 - after PR 795: no fatal error and works as expected

 Both the PR in this ticket and the patch in #51056 resolve the warning (<
 PHP8) and fatal error (PHP 8).

 I agree with @iandunn that this ticket is a duplicate of #51056, whereas
 50156 reports the PHP warning for < PHP 8 and this ticket reports the
 fatal error for PHP 8.

 Which solution is better?

 IMO `50156.diff` is a better solution.

 Why?

 The patch directly handles the conversion to the expected comma-separated
 string at the point where the `array` or
 `Requests_Utility_CaseInsensitiveDictionary` (dictionary) is returned from
 `rest_output_link_header()`.

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


More information about the wp-trac mailing list