[wp-trac] [WordPress Trac] #59103: Gutenberg 16.4 Footnotes Critical Bug on PHP 8.0
WordPress Trac
noreply at wordpress.org
Mon Aug 14 15:58:42 UTC 2023
#59103: Gutenberg 16.4 Footnotes Critical Bug on PHP 8.0
---------------------------+-----------------------------
Reporter: orangeavocad0 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Formats | Version: 6.3
Severity: critical | Keywords: needs-patch
Focuses: |
---------------------------+-----------------------------
I am currently using WordPress version 6.3, PHP 8.0.
There is no issue initially when creating a post with the footnotes block,
and is able to publish the post.
After a while, when trying to edit the same post again, I will see the
critical error as such as seen in the attachment.
{{{
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be
of type Countable|array, null given in
/wordpress/plugins/gutenberg/16.4.0/build/block-
library/blocks/footnotes.php:37 Stack trace: #0 /wordpress/core/6.3/wp-
includes/class-wp-block.php(258):
gutenberg_render_block_core_footnotes(Array, '', Object(WP_Block)) #1
/wordpress/core/6.3/wp-includes/blocks.php(1133): WP_Block->render() #2
/wordpress/core/6.3/wp-includes/blocks.php(1171): render_block(Array) #3
/wordpress/core/6.3/wp-includes/class-wp-hook.php(310): do_blocks('<!-- wp
:rank-ma...') #4 /wordpress/core/6.3/wp-includes/plugin.php(205):
WP_Hook->apply_filters('<!-- wp:rank-ma...', Array) #5 /wordpress/core/6.3
/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1864):
apply_filters('the_content', '<!-- wp:rank-ma...') #6 /wordpress/core/6.3
/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569):
WP_REST_Posts_Controller->prepare_item_for_response(Object(WP_Post),
Object(WP_REST_Request)) #7 /wordpress/core/6.3/wp-includes/rest-api
/class-wp-rest-server.php(1188):
WP_REST_Posts_Controller->get_item(Object(WP_REST_Request)) #8
/wordpress/core/6.3/wp-includes/rest-api/class-wp-rest-server.php(1035):
WP_REST_Server->respond_to_request(Object(WP_REST_Request),
'/wp/v2/posts/(?...', Array, NULL) #9 /wordpress/core/6.3/wp-includes
/rest-api.php(545): WP_REST_Server->dispatch(Object(WP_REST_Request)) #10
/wordpress/core/6.3/wp-includes/rest-api.php(2911):
rest_do_request(Object(WP_REST_Request)) #11 [internal function]:
rest_preload_api_request(Array, '/wp/v2/posts/57...') #12
/wordpress/core/6.3/wp-includes/block-editor.php(743): array_reduce(Array,
'rest_preload_ap...', Array) #13 /wordpress/core/6.3/wp-admin/edit-form-
blocks.php(77): block_editor_rest_api_preload(Array,
Object(WP_Block_Editor_Context)) #14 /wordpress/core/6.3/wp-
admin/post.php(187): require('/wordpress/core...') #15 {main} thrown in
/wordpress/plugins/gutenberg/16.4.0/build/block-
library/blocks/footnotes.php on line 37
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59103>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list