N°6037 - PHP 8.2: Migrate usage of strlen() with null value

This commit is contained in:
Molkobain
2024-01-30 10:10:52 +01:00
parent de86682562
commit 87b08669d7

View File

@@ -369,7 +369,7 @@ class ActionEmail extends ActionNotification
protected function FindRecipients($sRecipAttCode, $aArgs) protected function FindRecipients($sRecipAttCode, $aArgs)
{ {
$sOQL = $this->Get($sRecipAttCode); $sOQL = $this->Get($sRecipAttCode);
if (strlen($sOQL) === 0) return ''; if (utils::IsNullOrEmptyString($sOQL)) return '';
try try
{ {
@@ -413,7 +413,7 @@ class ActionEmail extends ActionNotification
while ($oObj = $oSet->Fetch()) while ($oObj = $oSet->Fetch())
{ {
$sAddress = trim($oObj->Get($sEmailAttCode)); $sAddress = trim($oObj->Get($sEmailAttCode));
if (strlen($sAddress) > 0) if (utils::IsNotNullOrEmptyString($sAddress))
{ {
$aRecipients[] = $sAddress; $aRecipients[] = $sAddress;
$this->m_iRecipients++; $this->m_iRecipients++;