Add validation for old configurations to avoid notices
This commit is contained in:
@@ -5271,6 +5271,12 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function buildFrom($configuration, $from = '') {
|
public static function buildFrom($configuration, $from = '') {
|
||||||
|
if (!isset($configuration['MESS_FROM_NAME'])) {
|
||||||
|
$configuration['MESS_FROM_NAME'] = '';
|
||||||
|
}
|
||||||
|
if (!isset($configuration['MESS_FROM_MAIL'])) {
|
||||||
|
$configuration['MESS_FROM_MAIL'] = '';
|
||||||
|
}
|
||||||
if ($from != '') {
|
if ($from != '') {
|
||||||
if (!preg_match('/(.+)@(.+)\.(.+)/', $from, $match)) {
|
if (!preg_match('/(.+)@(.+)\.(.+)/', $from, $match)) {
|
||||||
if ($configuration['MESS_FROM_MAIL'] != '') {
|
if ($configuration['MESS_FROM_MAIL'] != '') {
|
||||||
|
|||||||
@@ -194,6 +194,15 @@ class spoolRun
|
|||||||
$aConfig['MESS_RAUTH'] = 0;
|
$aConfig['MESS_RAUTH'] = 0;
|
||||||
}
|
}
|
||||||
$aConfig['SMTPAuth'] = $aConfig['MESS_RAUTH'];
|
$aConfig['SMTPAuth'] = $aConfig['MESS_RAUTH'];
|
||||||
|
|
||||||
|
// Validating for old configurations
|
||||||
|
if (!isset($aConfig['MESS_FROM_NAME'])) {
|
||||||
|
$aConfig['MESS_FROM_NAME'] = '';
|
||||||
|
}
|
||||||
|
if (!isset($aConfig['MESS_FROM_MAIL'])) {
|
||||||
|
$aConfig['MESS_FROM_MAIL'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->config = $aConfig;
|
$this->config = $aConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user