mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Fix closure warnings (#2087)
This commit is contained in:
parent
90e41635ed
commit
49d9093e44
4 changed files with 19 additions and 38 deletions
|
|
@ -67,7 +67,7 @@ class SubStreams
|
||||||
|
|
||||||
$sHashName = \MailSo\Base\Utils::Md5Rand();
|
$sHashName = \MailSo\Base\Utils::Md5Rand();
|
||||||
|
|
||||||
self::$aStreams[$sHashName] = array_map(function($mItem) {
|
self::$aStreams[$sHashName] = \array_map(function ($mItem) {
|
||||||
return \is_resource($mItem) ? $mItem :
|
return \is_resource($mItem) ? $mItem :
|
||||||
\MailSo\Base\ResourceRegistry::CreateMemoryResourceFromString($mItem);
|
\MailSo\Base\ResourceRegistry::CreateMemoryResourceFromString($mItem);
|
||||||
}, $aSubStreams);
|
}, $aSubStreams);
|
||||||
|
|
|
||||||
|
|
@ -5718,11 +5718,9 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
$aFlagsFilteredUids = array();
|
$aFlagsFilteredUids = array();
|
||||||
if (0 < strlen($sFlagsUids))
|
if (0 < strlen($sFlagsUids))
|
||||||
{
|
{
|
||||||
$aFlagsUids = explode(',', $sFlagsUids);
|
$aFlagsUids = \explode(',', $sFlagsUids);
|
||||||
$aFlagsFilteredUids = array_filter($aFlagsUids, function (&$sUid) {
|
$aFlagsUids = \array_map('intval', $aFlagsUids);
|
||||||
$sUid = (int) trim($sUid);
|
$aFlagsFilteredUids = \array_filter($aFlagsUids);
|
||||||
return 0 < (int) trim($sUid);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->initMailClientConnection();
|
$this->initMailClientConnection();
|
||||||
|
|
@ -7067,11 +7065,8 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
{
|
{
|
||||||
$oAccount = $this->getAccountFromToken();
|
$oAccount = $this->getAccountFromToken();
|
||||||
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
|
$aUids = \array_map('intval', $aUids);
|
||||||
$aFilteredUids = \array_filter($aUids, function (&$mUid) {
|
$aFilteredUids = \array_filter($aUids);
|
||||||
$mUid = (int) \trim($mUid);
|
|
||||||
return 0 < $mUid;
|
|
||||||
});
|
|
||||||
|
|
||||||
$bResult = false;
|
$bResult = false;
|
||||||
if (0 < \count($aFilteredUids) && $this->AddressBookProvider($oAccount)->IsActive())
|
if (0 < \count($aFilteredUids) && $this->AddressBookProvider($oAccount)->IsActive())
|
||||||
|
|
@ -7235,10 +7230,8 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
$sFolder = $this->GetActionParam('Folder', '');
|
$sFolder = $this->GetActionParam('Folder', '');
|
||||||
$bSetAction = '1' === (string) $this->GetActionParam('SetAction', '0');
|
$bSetAction = '1' === (string) $this->GetActionParam('SetAction', '0');
|
||||||
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
$aFilteredUids = \array_filter($aUids, function (&$sUid) {
|
$aUids = \array_map('intval', $aUids);
|
||||||
$sUid = (int) \trim($sUid);
|
$aFilteredUids = \array_filter($aUids);
|
||||||
return 0 < $sUid;
|
|
||||||
});
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -7356,11 +7349,8 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
|
|
||||||
$sFolder = $this->GetActionParam('Folder', '');
|
$sFolder = $this->GetActionParam('Folder', '');
|
||||||
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
|
$aUids = \array_map('intval', $aUids);
|
||||||
$aFilteredUids = \array_filter($aUids, function (&$sUid) {
|
$aFilteredUids = \array_filter($aUids);
|
||||||
$sUid = (int) \trim($sUid);
|
|
||||||
return 0 < $sUid;
|
|
||||||
});
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -7409,13 +7399,10 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
|
|
||||||
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
||||||
$sToFolder = $this->GetActionParam('ToFolder', '');
|
$sToFolder = $this->GetActionParam('ToFolder', '');
|
||||||
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
|
||||||
$bMarkAsRead = '1' === (string) $this->GetActionParam('MarkAsRead', '0');
|
$bMarkAsRead = '1' === (string) $this->GetActionParam('MarkAsRead', '0');
|
||||||
|
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
$aFilteredUids = \array_filter($aUids, function (&$mUid) {
|
$aUids = \array_map('intval', $aUids);
|
||||||
$mUid = (int) \trim($mUid);
|
$aFilteredUids = \array_filter($aUids);
|
||||||
return 0 < $mUid;
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($bMarkAsRead)
|
if ($bMarkAsRead)
|
||||||
{
|
{
|
||||||
|
|
@ -7479,11 +7466,8 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
$sFromFolder = $this->GetActionParam('FromFolder', '');
|
||||||
$sToFolder = $this->GetActionParam('ToFolder', '');
|
$sToFolder = $this->GetActionParam('ToFolder', '');
|
||||||
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
$aUids = \explode(',', (string) $this->GetActionParam('Uids', ''));
|
||||||
|
$aUids = \array_map('intval', $aUids);
|
||||||
$aFilteredUids = \array_filter($aUids, function (&$mUid) {
|
$aFilteredUids = \array_filter($aUids);
|
||||||
$mUid = (int) \trim($mUid);
|
|
||||||
return 0 < $mUid;
|
|
||||||
});
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -8462,7 +8446,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground Plugins
|
||||||
|
|
||||||
$sResultHash = '';
|
$sResultHash = '';
|
||||||
|
|
||||||
$mResult = $this->MailClient()->MessageMimeStream(function($rResource, $sContentType, $sFileName, $sMimeIndex = '')
|
$mResult = $this->MailClient()->MessageMimeStream(function ($rResource, $sContentType, $sFileName, $sMimeIndex = '')
|
||||||
use ($oAccount, $oFileProvider, $sFileNameIn, $sContentTypeIn, &$sResultHash) {
|
use ($oAccount, $oFileProvider, $sFileNameIn, $sContentTypeIn, &$sResultHash) {
|
||||||
|
|
||||||
unset($sContentType, $sFileName, $sMimeIndex);
|
unset($sContentType, $sFileName, $sMimeIndex);
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class Api
|
||||||
|
|
||||||
if (!empty($sSslCafile) || !empty($sSslCapath))
|
if (!empty($sSslCafile) || !empty($sSslCapath))
|
||||||
{
|
{
|
||||||
\MailSo\Hooks::Add('Net.NetClient.StreamContextSettings/Filter', function (&$aStreamContextSettings) use ($sSslCafile, $sSslCapath) {
|
\MailSo\Hooks::Add('Net.NetClient.StreamContextSettings/Filter', function ($aStreamContextSettings) use ($sSslCafile, $sSslCapath) {
|
||||||
if (isset($aStreamContextSettings['ssl']) && \is_array($aStreamContextSettings['ssl']))
|
if (isset($aStreamContextSettings['ssl']) && \is_array($aStreamContextSettings['ssl']))
|
||||||
{
|
{
|
||||||
if (empty($aStreamContextSettings['ssl']['cafile']) && !empty($sSslCafile))
|
if (empty($aStreamContextSettings['ssl']['cafile']) && !empty($sSslCafile))
|
||||||
|
|
|
||||||
|
|
@ -996,11 +996,8 @@ class PdoAddressBook
|
||||||
}
|
}
|
||||||
|
|
||||||
$iUserID = $this->getUserId($sEmail);
|
$iUserID = $this->getUserId($sEmail);
|
||||||
|
$aContactIds = \array_map('intval', $aContactIds);
|
||||||
$aContactIds = \array_filter($aContactIds, function (&$mItem) {
|
$aContactIds = \array_filter($aContactIds);
|
||||||
$mItem = (int) \trim($mItem);
|
|
||||||
return 0 < $mItem;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (0 === \count($aContactIds))
|
if (0 === \count($aContactIds))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue