mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-30 02:52:22 +08:00
Fix #577 - Fix empty addr variable creating logs
This commit is contained in:
parent
a2ff98643a
commit
bb4afd4b56
1 changed files with 25 additions and 23 deletions
|
@ -872,10 +872,7 @@ class SugarEmailAddress extends SugarBean
|
|||
$optOut = ''
|
||||
) {
|
||||
if (!is_array($new_addrs)) {
|
||||
$GLOBALS['log']->fatal(
|
||||
'Invalid Argument: new address should be an array of strings, ' .
|
||||
gettype($new_addrs) . ' given.'
|
||||
);
|
||||
$new_addrs = array($new_addrs);
|
||||
}
|
||||
$module = $this->getCorrectedModule($module);
|
||||
//One last check for the ConvertLead action in which case we need to change $module to 'Leads'
|
||||
|
@ -1083,6 +1080,11 @@ class SugarEmailAddress extends SugarBean
|
|||
$optIn = null
|
||||
) {
|
||||
$addr = html_entity_decode($addr, ENT_QUOTES);
|
||||
|
||||
if (empty($addr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (preg_match($this->regex, $addr)) {
|
||||
$primaryFlag = ($primary) ? '1' : '0';
|
||||
$replyToFlag = ($replyTo) ? '1' : '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue