From b96ec016282dacf841793efe9e9a57ae3ee044aa Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Wed, 30 Apr 2014 09:59:09 -0400 Subject: [PATCH] Add validation for old configurations to avoid notices --- gulliver/system/class.g.php | 6 ++++++ workflow/engine/classes/class.spool.php | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 55cf21c22..e93d6254d 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5292,6 +5292,12 @@ class G } 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 (!preg_match('/(.+)@(.+)\.(.+)/', $from, $match)) { if ($configuration['MESS_FROM_MAIL'] != '') { diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index ff95d8a1c..6c36595f5 100755 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -194,6 +194,15 @@ class spoolRun $aConfig['MESS_RAUTH'] = 0; } $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; }