Make WordPress Core

Changeset 52832


Ignore:
Timestamp:
03/09/2022 12:46:24 AM (2 years ago)
Author:
peterwilsoncc
Message:

Media: Revert query string support for wp_check_filetype().

Revert [52829] due to fatal errors in some Multisite configurations.

Props dd32, SergeyBiryukov, audrasjb.
See #30377.

Location:
trunk
Files:
1 deleted
1 edited

Legend:

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

    r52829 r52832  
    29822982 *
    29832983 * @since 2.0.4
    2984  * @since 6.0.0 URLs are now supported.
    2985  *
    2986  * @param string   $filename File name, path, or URL.
     2984 *
     2985 * @param string   $filename File name or path.
    29872986 * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
    29882987 * @return array {
     
    29992998    $type = false;
    30002999    $ext  = false;
    3001 
    3002     // Strip query args and fragment from filename to reveal extension.
    3003     $query_pos = strpos( $filename, '?' );
    3004 
    3005     if ( false !== $query_pos ) {
    3006         $filename = substr_replace( $filename, '', $query_pos );
    3007     }
    3008 
    3009     $filename = strip_fragment_from_url( $filename );
    30103000
    30113001    foreach ( $mimes as $ext_preg => $mime_match ) {
Note: See TracChangeset for help on using the changeset viewer.