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

WordPress Trac noreply at wordpress.org
Tue Dec 8 15:55:47 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 NicolasKulka):

 ye, function 'rest_output_link_wp_head' return two links

 This function 'rest_get_queried_resource_route' add a second link.


 {{{
 if ( is_singular() ) {
                 $route = rest_get_route_for_post( get_queried_object() );
         } elseif ( is_category() || is_tag() || is_tax() ) {
                 $route = rest_get_route_for_term( get_queried_object() );
         } elseif ( is_author() ) {
                 $route = '/wp/v2/users/' . get_queried_object_id();
         } else {
                 $route = '';
         }

         /**
          * Filters the REST route for the currently queried object.
          *
          * @since 5.5.0
          *
          * @param string $link The route with a leading slash, or an empty
 string.
          */
         return apply_filters( 'rest_queried_resource_route', $route );
 }}}

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


More information about the wp-trac mailing list