mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Small fixes
This commit is contained in:
parent
67f666fa7d
commit
9b59ad32dc
16 changed files with 433 additions and 233 deletions
|
|
@ -200,8 +200,22 @@ abstract class NetClient
|
|||
$this->rConnect = @\fsockopen($this->sConnectedHost, $this->iConnectedPort,
|
||||
$iErrorNo, $sErrorStr, $this->iConnectTimeOut);
|
||||
|
||||
if (!is_resource($this->rConnect))
|
||||
if (!\is_resource($this->rConnect))
|
||||
{
|
||||
if (!empty($sErrorStr) && !\MailSo\Base\Utils::IsUtf8($sErrorStr))
|
||||
{
|
||||
$sCharset = \MailSo\Base\Utils::DetectSystemCharset();
|
||||
if (!empty($sCharset))
|
||||
{
|
||||
$sErrorStr = \MailSo\Base\Utils::ConvertEncoding(
|
||||
$sErrorStr, $sCharset, \MailSo\Base\Enumerations\Charset::UTF_8);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sErrorStr = @\utf8_encode($sErrorStr);
|
||||
}
|
||||
}
|
||||
|
||||
$this->writeLogException(
|
||||
new Exceptions\SocketCanNotConnectToHostException(
|
||||
$sErrorStr, $iErrorNo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue