From f09ccf8924b8ff0a7df942e0c314ab9c52d26aa0 Mon Sep 17 00:00:00 2001 From: Ella Date: Fri, 1 Nov 2024 12:32:44 +0100 Subject: [PATCH] fix php notice --- lib/compat/wordpress-6.8/preload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.8/preload.php b/lib/compat/wordpress-6.8/preload.php index 4151ec3c533663..6067481a49e541 100644 --- a/lib/compat/wordpress-6.8/preload.php +++ b/lib/compat/wordpress-6.8/preload.php @@ -17,7 +17,7 @@ function gutenberg_block_editor_preload_paths_6_8( $paths, $context ) { } } - if ( $post ) { + if ( ! empty( $post ) ) { $route_for_post = rest_get_route_for_post( $post ); if ( $route_for_post ) { $paths[] = add_query_arg( 'context', 'edit', $route_for_post );