Skip to content

Commit 9063e30

Browse files
committed
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
1 parent 2dadc00 commit 9063e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/ms-files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
ms_file_constants();
2222

23-
if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) {
23+
if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
2424
status_header( 404 );
2525
die( '404 — File not found.' );
2626
}

0 commit comments

Comments
 (0)