From 5b960b476c1e95d16f5ea0cd9783a2d8dcb4b3b0 Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 25 Jan 2019 14:05:37 +0200 Subject: [PATCH] fix --- application/Espo/SelectManagers/Email.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/application/Espo/SelectManagers/Email.php b/application/Espo/SelectManagers/Email.php index c219f22d44..9e44570781 100644 --- a/application/Espo/SelectManagers/Email.php +++ b/application/Espo/SelectManagers/Email.php @@ -314,27 +314,26 @@ class Email extends \Espo\Core\SelectManagers\Base } - public function whereEmailAddress($value, array &$result) : array + public function whereEmailAddress(string $value, array &$result) { - $d = array(); + $orItem = []; $emailAddressId = $this->getEmailAddressIdByValue($value); if ($emailAddressId) { $this->leftJoinEmailAddress($result); - $d['fromEmailAddressId'] = $emailAddressId; - $d['emailEmailAddress.emailAddressId'] = $emailAddressId; - $result['whereClause'][] = array( - 'OR' => $d - ); + $orItem['fromEmailAddressId'] = $emailAddressId; + $orItem['emailEmailAddress.emailAddressId'] = $emailAddressId; + $result['whereClause'][] = [ + 'OR' => $orItem + ]; } else { if (empty($result['customWhere'])) { $result['customWhere'] = ''; } $result['customWhere'] .= ' AND 0'; } - } protected function getWherePartIsNotRepliedIsTrue()