WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2016 09:44:58 AM (4 years ago)
Author:
ocean90
Message:

Plugins: In plugin_basename() sort plugin paths before resolving symlinks.

arsort() sorts the paths reverse-alphabetically while preserving the keys. It results in a longer path being listed before a shorter one with the same base directory(ies).

Props jdgrimes, ocean90.
Fixes #28441.

File:
1 edited

Legend:

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

    r37911 r37983  
    732732    $file = wp_normalize_path( $file );
    733733
     734    arsort( $wp_plugin_paths );
    734735    foreach ( $wp_plugin_paths as $dir => $realdir ) {
    735736        if ( strpos( $file, $realdir ) === 0 ) {
Note: See TracChangeset for help on using the changeset viewer.