WordPress.org

Make WordPress Core

Ticket #9561: missing_slash.patch

File missing_slash.patch, 772 bytes (added by alexrabe, 5 years ago)
  • plugin.php

     
    494494        $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash 
    495495        $mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs 
    496496        $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash 
    497         $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir 
     497        $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir 
    498498        return $file; 
    499499} 
    500500