updated plugin `SMTP Mailer` version 1.1.2

This commit is contained in:
KawaiiPunk 2021-07-25 23:25:09 +00:00 committed by Gitium
parent a2480e23b7
commit aa6967db92
2 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<?php
/*
Plugin Name: SMTP Mailer
Version: 1.1.1
Version: 1.1.2
Plugin URI: https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482
Author: naa986
Author URI: https://wphowto.net/
@ -16,7 +16,7 @@ if (!defined('ABSPATH')){
class SMTP_MAILER {
var $plugin_version = '1.1.1';
var $plugin_version = '1.1.2';
var $phpmailer_version = '6.3.0';
var $plugin_url;
var $plugin_path;
@ -467,10 +467,9 @@ function smtp_mailer_pre_wp_mail($null, $atts)
if ( isset( $atts['attachments'] ) ) {
$attachments = $atts['attachments'];
}
if ( ! is_array( $attachments ) ) {
$attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
if ( ! is_array( $attachments ) ) {
$attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
}
}
$options = smtp_mailer_get_option();
@ -778,7 +777,7 @@ function smtp_mailer_pre_wp_mail($null, $atts)
}
}
if ( ! empty( $attachments ) ) {
if ( isset( $attachments ) && ! empty( $attachments ) ) {
foreach ( $attachments as $attachment ) {
try {
$phpmailer->addAttachment( $attachment );

View File

@ -3,8 +3,8 @@ Contributors: naa986
Donate link: https://wphowto.net/
Tags: email, mail, smtp, phpmailer
Requires at least: 5.7
Tested up to: 5.7
Stable tag: 1.1.1
Tested up to: 5.8
Stable tag: 1.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -107,6 +107,9 @@ none
== Changelog ==
= 1.1.2 =
* Fixed an issue that could cause an Undefined variable error if $attachments was not set.
= 1.1.1 =
* WordPress 5.7 compatibility update.