Fix file processing

master 1.2.2
Julien Rosset 5 days ago
parent a77612bad1
commit 9efb4049a5

@ -210,7 +210,8 @@ class PHPMailerEnhanced extends PHPMailer {
//region Check the link has no protocol (http, cid, etc.) or it's “file” //region Check the link has no protocol (http, cid, etc.) or it's “file”
if (preg_match('#^(?:(?<protocol>[a-z][a-z\d+.-]*):)?(?<path>.+)$#i', $link, $match) === 1) { if (preg_match('#^(?:(?<protocol>[a-z][a-z\d+.-]*):)?(?<path>.+)$#i', $link, $match) === 1) {
if (($match['protocol'] ?? '') !== 'file') { $protocol = $match['protocol'] ?? 'file';
if ($protocol !== '' && $protocol !== 'file') {
return $link; return $link;
} }
else { else {

Loading…
Cancel
Save