Use locale-safe basename function everywhere, fixes #1736

This commit is contained in:
Marcus Bointon 2019-05-27 21:33:40 +02:00
parent 463ccbbf16
commit cb2179828a
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 3 additions and 3 deletions

View File

@ -2847,7 +2847,7 @@ class PHPMailer
$type = static::filenameToType($path);
}
$filename = basename($path);
$filename = static::mb_pathinfo($path, PATHINFO_BASENAME);
if ('' == $name) {
$name = $filename;
}
@ -3417,7 +3417,7 @@ class PHPMailer
throw new Exception($this->lang('encoding') . $encoding);
}
$filename = basename($path);
$filename = static::mb_pathinfo($path, PATHINFO_BASENAME);
if ('' == $name) {
$name = $filename;
}
@ -3904,7 +3904,7 @@ class PHPMailer
// Do not change absolute URLs, including anonymous protocol
and !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
) {
$filename = basename($url);
$filename = static::mb_pathinfo($url, PATHINFO_BASENAME);
$directory = dirname($url);
if ('.' == $directory) {
$directory = '';