0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 10:02:14 +02:00

Ensure that even vars passed by reference are declared, fixes #1968

This commit is contained in:
Marcus Bointon 2020-02-17 09:20:45 +01:00
parent cc8da73fa2
commit 6ae518109e
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
3 changed files with 4 additions and 0 deletions

View File

@ -3987,6 +3987,7 @@ class PHPMailer
foreach ($images[2] as $imgindex => $url) {
// Convert data URIs into embedded images
//e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
$match = [];
if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) {
if (count($match) === 4 && static::ENCODING_BASE64 === $match[2]) {
$data = base64_decode($match[3]);

View File

@ -230,6 +230,8 @@ class POP3
}
// connect to the POP3 server
$errno = 0;
$errstr = '';
$this->pop_conn = fsockopen(
$host, // POP3 Host
$port, // Port #

View File

@ -1344,6 +1344,7 @@ class SMTP
} else {
$this->last_smtp_transaction_id = false;
foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
$matches = [];
if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
$this->last_smtp_transaction_id = trim($matches[1]);
break;