mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +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;
|
$sKeyPath = \substr($sKeyPath, 0, 2).'/'.\substr($sKeyPath, 2, 2).'/'.$sKeyPath;
|
||||||
|
|
||||||
$sFilePath = $this->sCacheFolder.$this->sKeyPrefix.$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))
|
$sFilePath = '';
|
||||||
{
|
|
||||||
if (!\mkdir(\dirname($sFilePath), 0755, true))
|
|
||||||
{
|
|
||||||
$sFilePath = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -578,7 +578,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
$this->aFetchCallbacks = array();
|
$this->aFetchCallbacks = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $oResult->getFetchResult();
|
return $oResult->getFetchResult($this->oLogger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -76,15 +76,15 @@ class ResponseCollection extends \MailSo\Base\Collection
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFetchResult() : array
|
public function getFetchResult($oLogger) : array
|
||||||
{
|
{
|
||||||
$aReturn = array();
|
$aReturn = array();
|
||||||
foreach ($this as $oResponse) {
|
foreach ($this as $oResponse) {
|
||||||
if (FetchResponse::IsValidFetchImapResponse($oResponse)) {
|
if (FetchResponse::IsValidFetchImapResponse($oResponse)) {
|
||||||
if (FetchResponse::IsNotEmptyFetchImapResponse($oResponse)) {
|
if (FetchResponse::IsNotEmptyFetchImapResponse($oResponse)) {
|
||||||
$aReturn[] = new FetchResponse($oResponse);
|
$aReturn[] = new FetchResponse($oResponse);
|
||||||
} else if ($this->oLogger) {
|
} else if ($oLogger) {
|
||||||
$this->oLogger->Write('Skipped Imap Response! ['.$oResponse->ToLine().']', \MailSo\Log\Enumerations\Type::NOTICE);
|
$oLogger->Write('Skipped Imap Response! ['.$oResponse->ToLine().']', \MailSo\Log\Enumerations\Type::NOTICE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue