diff options
author | Peter Wilson <peterwilsoncc@git.wordpress.org> | 2025-04-16 04:33:21 +0000 |
---|---|---|
committer | Peter Wilson <peterwilsoncc@git.wordpress.org> | 2025-04-16 04:33:21 +0000 |
commit | 9063e30f6f34d313ecdc3394f45ca63283732b24 (patch) | |
tree | 82673ecc889a5ba643cdc5b0a6ddaa7e22a57d62 /src | |
parent | 2dadc00a35e29270da4eabc064522d277361c2a9 (diff) | |
download | wordpress-9063e30f6f34d313ecdc3394f45ca63283732b24.tar.gz wordpress-9063e30f6f34d313ecdc3394f45ca63283732b24.zip |
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].
Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill.
See #36803.
Fixes #63285.
git-svn-id: https://develop.svn.wordpress.org/trunk@60170 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'src')
-rw-r--r-- | src/wp-includes/ms-files.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wp-includes/ms-files.php b/src/wp-includes/ms-files.php index a166d315aa..42826ede61 100644 --- a/src/wp-includes/ms-files.php +++ b/src/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.' ); } |