Commit c1d2220330 for wordpress.org

commit c1d22203300fa783f7604f38af86eb88d17135ab
Author: SergeyBiryukov <sergeybiryukov@git.wordpress.org>
Date:   Wed Oct 7 21:37:47 2026 +0000

    Code Quality: Remove a no-op assignment of `$addl_path` in `redirect_canonical()`.

    `$addl_path` is initialized to an empty string, and the feed branch then sets it to itself with a trailing slash if it is not empty. Since it is always empty at that point, the assignment always results in an empty string and is removed. There is no change in behavior.

    This resolves one error in the `empty.variable` PHPStan baseline.

    Developed in https://github.com/WordPress/wordpress-develop/pull/14007.

    Follow-up to r9697, r9883.

    Props Soean.
    See #65817.
    Built from https://develop.svn.wordpress.org/trunk@64236


    git-svn-id: http://core.svn.wordpress.org/trunk@63387 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php
index c284fe41fa..39dcf40685 100644
--- a/wp-includes/canonical.php
+++ b/wp-includes/canonical.php
@@ -456,8 +456,6 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
 			$default_feed = get_default_feed();

 			if ( is_feed() && in_array( $feed, $wp_rewrite->feeds, true ) ) {
-				$addl_path = ! empty( $addl_path ) ? trailingslashit( $addl_path ) : '';
-
 				if ( ! is_singular() && get_query_var( 'withcomments' ) ) {
 					$addl_path .= 'comments/';
 				}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 04f87dafb3..d448bcc9f3 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-64235';
+$wp_version = '7.2-alpha-64236';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.