WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/01/2019 08:57:26 PM (6 months ago)
Author:
jorbin
Message:

Replace usages of basename() with wp_basename() in order to support multibyte filenames

This is focused on the pieces of code that touch media files and the tests that support them. basename isn't multibyte compatible out of the box. See http://php.net/basename and https://bugs.php.net/bug.php?id=62119.

See #43170.
Props Viper007Bond.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r44528 r44785  
    15251525        $hash = 'e' . time() . rand( 100, 999 );
    15261526
    1527         $filename_base = basename( $image_meta['file'], '.png' );
     1527        $filename_base = wp_basename( $image_meta['file'], '.png' );
    15281528
    15291529        // Add the hash to the image URL
Note: See TracChangeset for help on using the changeset viewer.