Make WordPress Core


Ignore:
Timestamp:
03/01/2019 08:57:26 PM (6 years 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/blocks/render.php

    r44261 r44785  
    359359     */
    360360    protected function clean_fixture_filename( $filename ) {
    361         $filename = basename( $filename );
     361        $filename = wp_basename( $filename );
    362362        $filename = preg_replace( '/\..+$/', '', $filename );
    363363        return $filename;
Note: See TracChangeset for help on using the changeset viewer.