Make WordPress Core

Changeset 60170


Ignore:
Timestamp:
04/16/2025 04:33:21 AM (4 weeks ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-files.php

    r59967 r60170  
    2121ms_file_constants();
    2222
    23 if ( ! is_super_admin() && ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) ) {
     23if ( '1' === $current_blog->archived || '1' === $current_blog->spam || '1' === $current_blog->deleted ) {
    2424    status_header( 404 );
    2525    die( '404 — File not found.' );
Note: See TracChangeset for help on using the changeset viewer.