Skip to content

Commit 1563bf7

Browse files
committed
Site Editor: Fix PHP warning pre-loading page REST requests.
Fix a PHP warning when opening a page directly in the site editor, eg by navigating to the URL `/wp-admin/site-editor.php?p=%2Fpage&postId=200`, caused by an undefined variable name. Props abcd95, joemcgill, narenin, soyebsalar, websiteredev, wildworks. Fixes #63122. git-svn-id: https://develop.svn.wordpress.org/trunk@60061 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6436bf1 commit 1563bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/site-editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static function ( $classes ) {
239239
$preload_paths[] = add_query_arg(
240240
'slug',
241241
// @see https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254
242-
empty( $block_editor_context->post->post_name ) ? 'page' : 'page-' . $post->post_name,
242+
empty( $block_editor_context->post->post_name ) ? 'page' : 'page-' . $block_editor_context->post->post_name,
243243
'/wp/v2/templates/lookup'
244244
);
245245
}

0 commit comments

Comments
 (0)