From 1f3f36f93c03def76823f512b16d06c345ad7fc2 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Tue, 26 Nov 2013 11:54:49 -0400 Subject: [PATCH] Add some validations when Email configuration is empty --- workflow/engine/classes/class.spool.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index e97832db4..268a60863 100755 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -278,7 +278,7 @@ class spoolRun $this->fileData['from_name'] = ''; $this->fileData['from_email'] = $matches[0]; } - + // Set reply to preg_match( $this->longMailEreg, $this->fileData['from_name'], $matches ); if (isset($matches[3])) { @@ -566,7 +566,10 @@ class spoolRun $aConfiguration = $oConfiguration->load( "Emails", "", "", "", "" ); $aConfiguration = unserialize( $aConfiguration["CFG_VALUE"] ); - $passwd = $aConfiguration["MESS_PASSWORD"]; + if (!isset($aConfiguration["MESS_ENABLED"])) { + $aConfiguration["MESS_ENABLED"] = 0; + } + $passwd = isset($aConfiguration["MESS_PASSWORD"]) ? $aConfiguration["MESS_PASSWORD"] : ''; $passwdDec = G::decrypt( $passwd, "EMAILENCRYPT" ); $auxPass = explode( "hash:", $passwdDec );