Skip to content

Commit 9b52804

Browse files
chore: change filter function to a static function
1 parent ce90699 commit 9b52804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/canonical.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ function redirect_guess_404_permalink() {
990990
$post_name_for_filter = get_query_var( 'name' );
991991

992992
// Store the filter callback so we can remove it later.
993-
$post_name_where_filter = function ( $where, $query ) use ( $post_name_for_filter, $wpdb ) {
993+
$post_name_where_filter = static function ( $where, $query ) use ( $post_name_for_filter, $wpdb ) {
994994
// Only apply to our specific query.
995995
if ( isset( $query->query_vars['redirect_guess_404'] ) ) {
996996
$where .= $wpdb->prepare( " AND {$wpdb->posts}.post_name LIKE %s", $wpdb->esc_like( $post_name_for_filter ) . '%' );

0 commit comments

Comments
 (0)