Skip to content
Permalink
Browse files

fixes #904 avoid warnings on PHP 7.2+ with PHPMailer (without updatin…

…g PHPMailer)
  • Loading branch information...
plegall committed Jun 21, 2019
1 parent 46781c1 commit 4195572563cd85d10cc40fffa918ac82eac4d6c2
Showing with 8 additions and 1 deletion.
  1. +8 −1 include/functions_mail.inc.php
@@ -605,7 +605,14 @@ function pwg_mail($to, $args=array(), $tpl=array())
$conf_mail = get_mail_configuration();
}
include_once(PHPWG_ROOT_PATH.'include/phpmailer/PHPMailerAutoload.php');
// PHPMailer autoloader shows warnings with PHP 7.2. Solution to upgrade to PHPMailer 6
// implies requiring PHP 5.5, which is bigger than current requirement for Piwigo.
//
// include_once(PHPWG_ROOT_PATH.'include/phpmailer/PHPMailerAutoload.php');
//
// replace by direct include of the classes:
include_once(PHPWG_ROOT_PATH.'include/phpmailer/class.smtp.php');
include_once(PHPWG_ROOT_PATH.'include/phpmailer/class.phpmailer.php');
$mail = new PHPMailer;

0 comments on commit 4195572

Please sign in to comment.
You can’t perform that action at this time.