mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Bugfix: MailSo ResponseCollection undefined oLogger
Bugfix: MailSo cache driver file, no need for double mkdir()
This commit is contained in:
parent
e99a69a9aa
commit
aa3f71d299
3 changed files with 7 additions and 12 deletions
|
|
@ -92,15 +92,10 @@ class File implements \MailSo\Cache\DriverInterface
|
|||
$sKeyPath = \substr($sKeyPath, 0, 2).'/'.\substr($sKeyPath, 2, 2).'/'.$sKeyPath;
|
||||
|
||||
$sFilePath = $this->sCacheFolder.$this->sKeyPrefix.$sKeyPath;
|
||||
if ($bMkDir && !\is_dir(\dirname($sFilePath)))
|
||||
$dir = \dirname($sFilePath);
|
||||
if ($bMkDir && !\is_dir($dir) && !\mkdir($dir, 0755, true))
|
||||
{
|
||||
if (!\mkdir(\dirname($sFilePath), 0755, true))
|
||||
{
|
||||
if (!\mkdir(\dirname($sFilePath), 0755, true))
|
||||
{
|
||||
$sFilePath = '';
|
||||
}
|
||||
}
|
||||
$sFilePath = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$this->aFetchCallbacks = array();
|
||||
}
|
||||
|
||||
return $oResult->getFetchResult();
|
||||
return $oResult->getFetchResult($this->oLogger);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -76,15 +76,15 @@ class ResponseCollection extends \MailSo\Base\Collection
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getFetchResult() : array
|
||||
public function getFetchResult($oLogger) : array
|
||||
{
|
||||
$aReturn = array();
|
||||
foreach ($this as $oResponse) {
|
||||
if (FetchResponse::IsValidFetchImapResponse($oResponse)) {
|
||||
if (FetchResponse::IsNotEmptyFetchImapResponse($oResponse)) {
|
||||
$aReturn[] = new FetchResponse($oResponse);
|
||||
} else if ($this->oLogger) {
|
||||
$this->oLogger->Write('Skipped Imap Response! ['.$oResponse->ToLine().']', \MailSo\Log\Enumerations\Type::NOTICE);
|
||||
} else if ($oLogger) {
|
||||
$oLogger->Write('Skipped Imap Response! ['.$oResponse->ToLine().']', \MailSo\Log\Enumerations\Type::NOTICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue