Update to Kirby 3.7.5
This commit is contained in:
@@ -31,7 +31,8 @@ class SimpleImage {
|
||||
ERR_LIB_NOT_LOADED = 8,
|
||||
ERR_UNSUPPORTED_FORMAT = 9,
|
||||
ERR_WEBP_NOT_ENABLED = 10,
|
||||
ERR_WRITE = 11;
|
||||
ERR_WRITE = 11,
|
||||
ERR_INVALID_FLAG = 12;
|
||||
|
||||
|
||||
protected $image;
|
||||
@@ -46,9 +47,10 @@ class SimpleImage {
|
||||
* Creates a new SimpleImage object.
|
||||
*
|
||||
* @param string $image An image file or a data URI to load.
|
||||
* @param array $flags Optional override of default flags.
|
||||
* @throws \Exception Thrown if the GD library is not found; file|URI or image data is invalid.
|
||||
*/
|
||||
public function __construct($image = '') {
|
||||
public function __construct($image = '', $flags = []) {
|
||||
// Check for the required GD extension
|
||||
if(extension_loaded('gd')) {
|
||||
// Ignore JPEG warnings that cause imagecreatefromjpeg() to fail
|
||||
@@ -57,6 +59,16 @@ class SimpleImage {
|
||||
throw new \Exception('Required extension GD is not loaded.', self::ERR_GD_NOT_ENABLED);
|
||||
}
|
||||
|
||||
// Associative array of flags.
|
||||
$this->flags = [
|
||||
"sslVerify" => true // Skip SSL peer validation
|
||||
];
|
||||
|
||||
// Override default flag values.
|
||||
foreach($flags as $flag => $value) {
|
||||
$this->setFlag($flag, $value);
|
||||
}
|
||||
|
||||
// Load an image through the constructor
|
||||
if(preg_match('/^data:(.*?);/', $image)) {
|
||||
$this->fromDataUri($image);
|
||||
@@ -77,6 +89,37 @@ class SimpleImage {
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Helper functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Set flag value.
|
||||
*
|
||||
* @param string $flag Name of the flag to set.
|
||||
* @param boolean $value State of the flag.
|
||||
* @throws \Exception Thrown if flag does not exist (no default value).
|
||||
*/
|
||||
public function setFlag($flag, $value) {
|
||||
// Throw if flag does not exist
|
||||
if(!in_array($flag, array_keys($this->flags))) {
|
||||
throw new \Exception('Invalid flag.', self::ERR_INVALID_FLAG);
|
||||
}
|
||||
|
||||
// Set flag value by name
|
||||
$this->flags[$flag] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get flag value.
|
||||
*
|
||||
* @param string $flag Name of the flag to get.
|
||||
* @return boolean|null
|
||||
*/
|
||||
public function getFlag($flag) {
|
||||
return in_array($flag, array_keys($this->flags)) ? $this->flags[$flag] : null;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Loaders
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -118,70 +161,66 @@ class SimpleImage {
|
||||
* Loads an image from a file.
|
||||
*
|
||||
* @param string $file The image file to load.
|
||||
* @param boolean $sslVerify Set to false to skip SSL validation.
|
||||
* @throws \Exception Thrown if file or image data is invalid.
|
||||
* @return \claviska\SimpleImage
|
||||
*/
|
||||
public function fromFile($file) {
|
||||
// Check if the file exists and is readable. We're using fopen() instead of file_exists()
|
||||
// because not all URL wrappers support the latter.
|
||||
$handle = @fopen($file, 'r');
|
||||
if($handle === false) {
|
||||
// Set fopen options.
|
||||
$sslVerify = $this->getFlag("sslVerify"); // Don't perform peer validation when true
|
||||
$opts = [
|
||||
"ssl" => [
|
||||
"verify_peer" => $sslVerify,
|
||||
"verify_peer_name" => $sslVerify
|
||||
]
|
||||
];
|
||||
|
||||
// Check if the file exists and is readable.
|
||||
$file = @file_get_contents($file, false, stream_context_create($opts));
|
||||
if($file === false) {
|
||||
throw new \Exception("File not found: $file", self::ERR_FILE_NOT_FOUND);
|
||||
}
|
||||
fclose($handle);
|
||||
|
||||
// Create image object from string
|
||||
$this->image = imagecreatefromstring($file);
|
||||
|
||||
// Get image info
|
||||
$info = @getimagesize($file);
|
||||
$info = @getimagesizefromstring($file);
|
||||
if($info === false) {
|
||||
throw new \Exception("Invalid image file: $file", self::ERR_INVALID_IMAGE);
|
||||
}
|
||||
$this->mimeType = $info['mime'];
|
||||
|
||||
// Create image object from file
|
||||
switch($this->mimeType) {
|
||||
case 'image/gif':
|
||||
// Load the gif
|
||||
$gif = imagecreatefromgif($file);
|
||||
if($gif) {
|
||||
// Copy the gif over to a true color image to preserve its transparency. This is a
|
||||
// workaround to prevent imagepalettetruecolor() from borking transparency.
|
||||
$width = imagesx($gif);
|
||||
$height = imagesy($gif);
|
||||
$this->image = imagecreatetruecolor((int) $width, (int) $height);
|
||||
$transparentColor = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
|
||||
imagecolortransparent($this->image, $transparentColor);
|
||||
imagefill($this->image, 0, 0, $transparentColor);
|
||||
imagecopy($this->image, $gif, 0, 0, 0, 0, $width, $height);
|
||||
imagedestroy($gif);
|
||||
}
|
||||
break;
|
||||
case 'image/jpeg':
|
||||
$this->image = imagecreatefromjpeg($file);
|
||||
break;
|
||||
case 'image/png':
|
||||
$this->image = imagecreatefrompng($file);
|
||||
break;
|
||||
case 'image/webp':
|
||||
$this->image = imagecreatefromwebp($file);
|
||||
break;
|
||||
case 'image/bmp':
|
||||
case 'image/x-ms-bmp':
|
||||
case 'image/x-windows-bmp':
|
||||
$this->image = imagecreatefrombmp($file);
|
||||
break;
|
||||
}
|
||||
if(!$this->image) {
|
||||
throw new \Exception("Unsupported format: " . $this->mimeType, self::ERR_UNSUPPORTED_FORMAT);
|
||||
}
|
||||
|
||||
switch($this->mimeType) {
|
||||
case 'image/gif':
|
||||
// Copy the gif over to a true color image to preserve its transparency. This is a
|
||||
// workaround to prevent imagepalettetotruecolor() from borking transparency.
|
||||
$width = imagesx($this->image);
|
||||
$height = imagesx($this->image);
|
||||
|
||||
$gif = imagecreatetruecolor((int) $width, (int) $height);
|
||||
$alpha = imagecolorallocatealpha($gif, 0, 0, 0, 127);
|
||||
imagecolortransparent($gif, $alpha);
|
||||
imagefill($gif, 0, 0, $alpha);
|
||||
|
||||
imagecopy($this->image, $gif, 0, 0, 0, 0, $width, $height);
|
||||
imagedestroy($gif);
|
||||
break;
|
||||
case 'image/jpeg':
|
||||
// Load exif data from JPEG images
|
||||
if(function_exists('exif_read_data')) {
|
||||
$this->exif = @exif_read_data("data://image/jpeg;base64," . base64_encode($file));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Convert pallete images to true color images
|
||||
imagepalettetotruecolor($this->image);
|
||||
|
||||
// Load exif data from JPEG images
|
||||
if($this->mimeType === 'image/jpeg' && function_exists('exif_read_data')) {
|
||||
$this->exif = @exif_read_data($file);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
3
kirby/vendor/composer/autoload_classmap.php
vendored
3
kirby/vendor/composer/autoload_classmap.php
vendored
@@ -285,9 +285,6 @@ return array(
|
||||
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
|
||||
'Spyc' => $baseDir . '/dependencies/spyc/Spyc.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php',
|
||||
|
3
kirby/vendor/composer/autoload_static.php
vendored
3
kirby/vendor/composer/autoload_static.php
vendored
@@ -377,9 +377,6 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
|
||||
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
|
||||
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
|
||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
||||
'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
|
||||
'Spyc' => __DIR__ . '/../..' . '/dependencies/spyc/Spyc.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php',
|
||||
|
28
kirby/vendor/composer/installed.json
vendored
28
kirby/vendor/composer/installed.json
vendored
@@ -2,17 +2,17 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "claviska/simpleimage",
|
||||
"version": "3.6.5",
|
||||
"version_normalized": "3.6.5.0",
|
||||
"version": "3.7.0",
|
||||
"version_normalized": "3.7.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/claviska/SimpleImage.git",
|
||||
"reference": "00f90662686696b9b7157dbb176183aabe89700f"
|
||||
"reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/00f90662686696b9b7157dbb176183aabe89700f",
|
||||
"reference": "00f90662686696b9b7157dbb176183aabe89700f",
|
||||
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/abd15ced313c7b8041d7d73d8d2398b4f2510cf1",
|
||||
"reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -20,7 +20,7 @@
|
||||
"league/color-extractor": "0.3.*",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"time": "2021-12-01T12:42:55+00:00",
|
||||
"time": "2022-07-05T13:18:44+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -42,7 +42,7 @@
|
||||
"description": "A PHP class that makes working with images as simple as possible.",
|
||||
"support": {
|
||||
"issues": "https://github.com/claviska/SimpleImage/issues",
|
||||
"source": "https://github.com/claviska/SimpleImage/tree/3.6.5"
|
||||
"source": "https://github.com/claviska/SimpleImage/tree/3.7.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -361,17 +361,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.6.3",
|
||||
"version_normalized": "6.6.3.0",
|
||||
"version": "v6.6.4",
|
||||
"version_normalized": "6.6.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "9400f305a898f194caff5521f64e5dfa926626f3"
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3",
|
||||
"reference": "9400f305a898f194caff5521f64e5dfa926626f3",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"reference": "a94fdebaea6bd17f51be0c2373ab80d3d681269b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -398,7 +398,7 @@
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"time": "2022-06-20T09:21:02+00:00",
|
||||
"time": "2022-08-22T09:22:00+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -430,7 +430,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
20
kirby/vendor/composer/installed.php
vendored
20
kirby/vendor/composer/installed.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'getkirby/cms',
|
||||
'pretty_version' => '3.7.4',
|
||||
'version' => '3.7.4.0',
|
||||
'pretty_version' => '3.7.5',
|
||||
'version' => '3.7.5.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
@@ -11,9 +11,9 @@
|
||||
),
|
||||
'versions' => array(
|
||||
'claviska/simpleimage' => array(
|
||||
'pretty_version' => '3.6.5',
|
||||
'version' => '3.6.5.0',
|
||||
'reference' => '00f90662686696b9b7157dbb176183aabe89700f',
|
||||
'pretty_version' => '3.7.0',
|
||||
'version' => '3.7.0.0',
|
||||
'reference' => 'abd15ced313c7b8041d7d73d8d2398b4f2510cf1',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../claviska/simpleimage',
|
||||
'aliases' => array(),
|
||||
@@ -29,8 +29,8 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'getkirby/cms' => array(
|
||||
'pretty_version' => '3.7.4',
|
||||
'version' => '3.7.4.0',
|
||||
'pretty_version' => '3.7.5',
|
||||
'version' => '3.7.5.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
@@ -80,9 +80,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.6.3',
|
||||
'version' => '6.6.3.0',
|
||||
'reference' => '9400f305a898f194caff5521f64e5dfa926626f3',
|
||||
'pretty_version' => 'v6.6.4',
|
||||
'version' => '6.6.4.0',
|
||||
'reference' => 'a94fdebaea6bd17f51be0c2373ab80d3d681269b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
|
@@ -5,22 +5,29 @@
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .';
|
||||
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: ';
|
||||
$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';
|
||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: ';
|
||||
|
@@ -350,8 +350,8 @@ class PHPMailer
|
||||
public $Password = '';
|
||||
|
||||
/**
|
||||
* SMTP auth type.
|
||||
* Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
|
||||
* SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2.
|
||||
* If not specified, the first one from that list that the server supports will be selected.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
@@ -750,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.3';
|
||||
const VERSION = '6.6.4';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@@ -1096,7 +1096,7 @@ class PHPMailer
|
||||
|
||||
return false;
|
||||
}
|
||||
if ($name !== null) {
|
||||
if ($name !== null && is_string($name)) {
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
} else {
|
||||
$name = '';
|
||||
@@ -1288,7 +1288,7 @@ class PHPMailer
|
||||
*/
|
||||
public function setFrom($address, $name = '', $auto = true)
|
||||
{
|
||||
$address = trim($address);
|
||||
$address = trim((string)$address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
//Don't validate now addresses with IDN. Will be done in send().
|
||||
$pos = strrpos($address, '@');
|
||||
@@ -1891,7 +1891,14 @@ class PHPMailer
|
||||
foreach ($this->to as $toaddr) {
|
||||
$toArr[] = $this->addrFormat($toaddr);
|
||||
}
|
||||
$to = implode(', ', $toArr);
|
||||
$to = trim(implode(', ', $toArr));
|
||||
|
||||
//If there are no To-addresses (e.g. when sending only to BCC-addresses)
|
||||
//the following should be added to get a correct DKIM-signature.
|
||||
//Compare with $this->preSend()
|
||||
if ($to === '') {
|
||||
$to = 'undisclosed-recipients:;';
|
||||
}
|
||||
|
||||
$params = null;
|
||||
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||
@@ -4470,6 +4477,7 @@ class PHPMailer
|
||||
'ics' => 'text/calendar',
|
||||
'xml' => 'text/xml',
|
||||
'xsl' => 'text/xml',
|
||||
'csv' => 'text/csv',
|
||||
'wmv' => 'video/x-ms-wmv',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
|
@@ -46,7 +46,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.3';
|
||||
const VERSION = '6.6.4';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
@@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.3';
|
||||
const VERSION = '6.6.4';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
|
Reference in New Issue
Block a user