[wp-trac] [WordPress Trac] #60762: WP_Navigation_Block_Renderer::get_markup_for_inner_block() can return null causing PHP8 error

WordPress Trac noreply at wordpress.org
Wed Mar 13 05:12:50 UTC 2024


#60762: WP_Navigation_Block_Renderer::get_markup_for_inner_block() can return null
causing PHP8 error
-----------------------------+------------------------------
 Reporter:  afragen          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  highest omg bbq  |   Milestone:  Awaiting Review
Component:  Editor           |     Version:  trunk
 Severity:  major            |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by afragen):

 Probably a better fix.


 {{{
         private static function get_markup_for_inner_block( $inner_block )
 {
                 $inner_block_content = $inner_block->render() ?? '';
                 if ( ! empty( $inner_block_content ) ) {
                         if ( static::does_block_need_a_list_item_wrapper(
 $inner_block ) ) {
                                 return '<li class="wp-block-navigation-
 item">' . $inner_block_content . '</li>';
                         }
                 }
                 return $inner_block_content;
         }

 }}}

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


More information about the wp-trac mailing list