Make WordPress Core

Changeset 60171


Ignore:
Timestamp:
04/16/2025 10:21:02 PM (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].

Reviewed by jorbin.
Merges [60170] to the 6.8 branch.

Props audrasjb, desrosj, jeremyfelt, johnjamesjacoby, jorbin, presskopp, verygoode, dd32, joemcgill.
See #36803.
Fixes #63285.

Location:
branches/6.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.8

  • branches/6.8/src/wp-includes/ms-files.php

    r59967 r60171  
    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.