From 0d5205144d40387982b4a7b047ed099fc2407f1c Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Wed, 16 Apr 2025 22:23:29 +0000 Subject: [PATCH] Media: Prevent Multisite fatal error in legacy file rewrites. Removes a call to the `is_super_admin()` function in `ms-files.php` as the function isn't available when using the `SHORTINIT` feature, causing fatal errors on systems using file rewrites. Reverts [59967]. Reviewed by jorbin. Merges [60170] to the 6.8 branch. Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill. See #36803. Fixes #63285. Built from https://develop.svn.wordpress.org/branches/6.8@60171 git-svn-id: http://core.svn.wordpress.org/branches/6.8@59507 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-files.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php index a166d315aa..42826ede61 100644 --- a/wp-includes/ms-files.php +++ b/wp-includes/ms-files.php @@ -20,7 +20,7 @@ if ( ! is_multisite() ) { ms_file_constants(); -if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) { +if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) { status_header( 404 ); die( '404 — File not found.' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index e0e253c3ae..ae2bd64993 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8.1-alpha-60169'; +$wp_version = '6.8.1-alpha-60171'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.