mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix PHP 7.4 Deprecate message
This commit is contained in:
parent
15ceddc202
commit
a250d84025
8 changed files with 27 additions and 27 deletions
|
|
@ -700,7 +700,7 @@ END;
|
||||||
{
|
{
|
||||||
$iPos = \strpos($aTempArr[1], '?', 2);
|
$iPos = \strpos($aTempArr[1], '?', 2);
|
||||||
$aTempArr[0] = \substr($aTempArr[1], 2, $iPos - 2);
|
$aTempArr[0] = \substr($aTempArr[1], 2, $iPos - 2);
|
||||||
$sEncType = \strtoupper($aTempArr[1]{$iPos + 1});
|
$sEncType = \strtoupper($aTempArr[1][$iPos + 1]);
|
||||||
switch ($sEncType)
|
switch ($sEncType)
|
||||||
{
|
{
|
||||||
case 'Q':
|
case 'Q':
|
||||||
|
|
@ -1986,13 +1986,13 @@ END;
|
||||||
|
|
||||||
for ($iIndex = 0; $iLen > 0; $iIndex++, $iLen--)
|
for ($iIndex = 0; $iLen > 0; $iIndex++, $iLen--)
|
||||||
{
|
{
|
||||||
$sChar = $sStr{$iIndex};
|
$sChar = $sStr[$iIndex];
|
||||||
if ($sChar == '&')
|
if ($sChar == '&')
|
||||||
{
|
{
|
||||||
$iIndex++;
|
$iIndex++;
|
||||||
$iLen--;
|
$iLen--;
|
||||||
|
|
||||||
$sChar = isset($sStr{$iIndex}) ? $sStr{$iIndex} : null;
|
$sChar = isset($sStr[$iIndex]) ? $sStr[$iIndex] : null;
|
||||||
if ($sChar === null)
|
if ($sChar === null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
@ -2008,7 +2008,7 @@ END;
|
||||||
$iK = 10;
|
$iK = 10;
|
||||||
for (; $iLen > 0; $iIndex++, $iLen--)
|
for (; $iLen > 0; $iIndex++, $iLen--)
|
||||||
{
|
{
|
||||||
$sChar = $sStr{$iIndex};
|
$sChar = $sStr[$iIndex];
|
||||||
|
|
||||||
$iB = $aArray[\ord($sChar)];
|
$iB = $aArray[\ord($sChar)];
|
||||||
if ((\ord($sChar) & 0x80) || $iB == -1)
|
if ((\ord($sChar) & 0x80) || $iB == -1)
|
||||||
|
|
@ -2052,7 +2052,7 @@ END;
|
||||||
|
|
||||||
if (($iCh || $iK < 6) ||
|
if (($iCh || $iK < 6) ||
|
||||||
(!$iLen || $sChar != '-') ||
|
(!$iLen || $sChar != '-') ||
|
||||||
($iLen > 2 && '&' === $sStr{$iIndex+1} && '-' !== $sStr{$iIndex+2}))
|
($iLen > 2 && '&' === $sStr[$iIndex+1] && '-' !== $sStr[$iIndex+2]))
|
||||||
{
|
{
|
||||||
return $bError;
|
return $bError;
|
||||||
}
|
}
|
||||||
|
|
@ -2090,7 +2090,7 @@ END;
|
||||||
|
|
||||||
while ($sLen)
|
while ($sLen)
|
||||||
{
|
{
|
||||||
$iC = \ord($sStr{$iIndex});
|
$iC = \ord($sStr[$iIndex]);
|
||||||
if ($iC < 0x80)
|
if ($iC < 0x80)
|
||||||
{
|
{
|
||||||
$iCh = $iC;
|
$iCh = $iC;
|
||||||
|
|
@ -2140,7 +2140,7 @@ END;
|
||||||
|
|
||||||
for ($iJ = 0; $iJ < $iN; $iJ++)
|
for ($iJ = 0; $iJ < $iN; $iJ++)
|
||||||
{
|
{
|
||||||
$iO = \ord($sStr{$iIndex+$iJ});
|
$iO = \ord($sStr[$iIndex+$iJ]);
|
||||||
if (($iO & 0xc0) != 0x80)
|
if (($iO & 0xc0) != 0x80)
|
||||||
{
|
{
|
||||||
return $bError;
|
return $bError;
|
||||||
|
|
|
||||||
|
|
@ -102,11 +102,11 @@ class Email
|
||||||
|
|
||||||
while ($iCurrentIndex < \strlen($sEmailAddress))
|
while ($iCurrentIndex < \strlen($sEmailAddress))
|
||||||
{
|
{
|
||||||
switch ($sEmailAddress{$iCurrentIndex})
|
switch ($sEmailAddress[$iCurrentIndex])
|
||||||
{
|
{
|
||||||
// case '\'':
|
// case '\'':
|
||||||
case '"':
|
case '"':
|
||||||
// $sQuoteChar = $sEmailAddress{$iCurrentIndex};
|
// $sQuoteChar = $sEmailAddress[$iCurrentIndex];
|
||||||
if ((!$bInName) && (!$bInAddress) && (!$bInComment))
|
if ((!$bInName) && (!$bInAddress) && (!$bInComment))
|
||||||
{
|
{
|
||||||
$bInName = true;
|
$bInName = true;
|
||||||
|
|
|
||||||
|
|
@ -156,16 +156,16 @@ class EmailCollection extends \MailSo\Base\Collection
|
||||||
|
|
||||||
while ($iCurrentPos < $sWorkingRecipientsLen)
|
while ($iCurrentPos < $sWorkingRecipientsLen)
|
||||||
{
|
{
|
||||||
switch ($sWorkingRecipients{$iCurrentPos})
|
switch ($sWorkingRecipients[$iCurrentPos])
|
||||||
{
|
{
|
||||||
case '\'':
|
case '\'':
|
||||||
case '"':
|
case '"':
|
||||||
if (!$bIsInQuotes)
|
if (!$bIsInQuotes)
|
||||||
{
|
{
|
||||||
$sChQuote = $sWorkingRecipients{$iCurrentPos};
|
$sChQuote = $sWorkingRecipients[$iCurrentPos];
|
||||||
$bIsInQuotes = true;
|
$bIsInQuotes = true;
|
||||||
}
|
}
|
||||||
else if ($sChQuote == $sWorkingRecipients{$iCurrentPos})
|
else if ($sChQuote == $sWorkingRecipients[$iCurrentPos])
|
||||||
{
|
{
|
||||||
$bIsInQuotes = false;
|
$bIsInQuotes = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,11 +111,11 @@ class EmailDep
|
||||||
|
|
||||||
while ($iCurrentIndex < \strlen($sEmailAddress))
|
while ($iCurrentIndex < \strlen($sEmailAddress))
|
||||||
{
|
{
|
||||||
switch ($sEmailAddress{$iCurrentIndex})
|
switch ($sEmailAddress[$iCurrentIndex])
|
||||||
{
|
{
|
||||||
// case '\'':
|
// case '\'':
|
||||||
case '"':
|
case '"':
|
||||||
// $sQuoteChar = $sEmailAddress{$iCurrentIndex};
|
// $sQuoteChar = $sEmailAddress[$iCurrentIndex];
|
||||||
if ((!$bInName) && (!$bInAddress) && (!$bInComment))
|
if ((!$bInName) && (!$bInAddress) && (!$bInComment))
|
||||||
{
|
{
|
||||||
$bInName = true;
|
$bInName = true;
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
||||||
$sScript = '';
|
$sScript = '';
|
||||||
if (\is_array($mResponse) && 0 < \count($mResponse))
|
if (\is_array($mResponse) && 0 < \count($mResponse))
|
||||||
{
|
{
|
||||||
if ('{' === $mResponse[0]{0})
|
if ('{' === $mResponse[0][0])
|
||||||
{
|
{
|
||||||
\array_shift($mResponse);
|
\array_shift($mResponse);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2687,7 +2687,7 @@ class Net_IDNA2
|
||||||
|
|
||||||
if ($delim_pos > self::_byteLength($this->_punycode_prefix)) {
|
if ($delim_pos > self::_byteLength($this->_punycode_prefix)) {
|
||||||
for ($k = self::_byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) {
|
for ($k = self::_byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) {
|
||||||
$decoded[] = ord($encoded{$k});
|
$decoded[] = ord($encoded[$k]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$decoded = array();
|
$decoded = array();
|
||||||
|
|
@ -2704,7 +2704,7 @@ class Net_IDNA2
|
||||||
|
|
||||||
for ($enco_idx = ($delim_pos)? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) {
|
for ($enco_idx = ($delim_pos)? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) {
|
||||||
for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) {
|
for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) {
|
||||||
$digit = $this->_decodeDigit($encoded{$enco_idx++});
|
$digit = $this->_decodeDigit($encoded[$enco_idx++]);
|
||||||
$idx += $digit * $w;
|
$idx += $digit * $w;
|
||||||
|
|
||||||
$t = ($k <= $bias) ?
|
$t = ($k <= $bias) ?
|
||||||
|
|
@ -3116,7 +3116,7 @@ class Net_IDNA2
|
||||||
$mode = 'next';
|
$mode = 'next';
|
||||||
$test = 'none';
|
$test = 'none';
|
||||||
for ($k = 0; $k < $inp_len; ++$k) {
|
for ($k = 0; $k < $inp_len; ++$k) {
|
||||||
$v = ord($input{$k}); // Extract byte from input string
|
$v = ord($input[$k]); // Extract byte from input string
|
||||||
|
|
||||||
if ($v < 128) { // We found an ASCII char - put into stirng as is
|
if ($v < 128) { // We found an ASCII char - put into stirng as is
|
||||||
$output[$out_len] = $v;
|
$output[$out_len] = $v;
|
||||||
|
|
@ -3283,7 +3283,7 @@ class Net_IDNA2
|
||||||
$out_len++;
|
$out_len++;
|
||||||
$output[$out_len] = 0;
|
$output[$out_len] = 0;
|
||||||
}
|
}
|
||||||
$output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) );
|
$output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4) ) );
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9260,7 +9260,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
{
|
{
|
||||||
while (($sFile = \readdir($rDirH)) !== false)
|
while (($sFile = \readdir($rDirH)) !== false)
|
||||||
{
|
{
|
||||||
if ('.' !== $sFile{0} && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
|
if ('.' !== $sFile[0] && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
|
||||||
{
|
{
|
||||||
if ('Default' === $sFile)
|
if ('Default' === $sFile)
|
||||||
{
|
{
|
||||||
|
|
@ -9288,7 +9288,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
{
|
{
|
||||||
while (($sFile = \readdir($rDirH)) !== false)
|
while (($sFile = \readdir($rDirH)) !== false)
|
||||||
{
|
{
|
||||||
if ('.' !== $sFile{0} && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
|
if ('.' !== $sFile[0] && \is_dir($sDir.'/'.$sFile) && \file_exists($sDir.'/'.$sFile.'/styles.less'))
|
||||||
{
|
{
|
||||||
$sList[] = $sFile.'@custom';
|
$sList[] = $sFile.'@custom';
|
||||||
}
|
}
|
||||||
|
|
@ -9341,7 +9341,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
||||||
{
|
{
|
||||||
while (($sFile = \readdir($rDirH)) !== false)
|
while (($sFile = \readdir($rDirH)) !== false)
|
||||||
{
|
{
|
||||||
if ('.' !== $sFile{0} && \is_file($sDir.'/'.$sFile) && '.yml' === \substr($sFile, -4))
|
if ('.' !== $sFile[0] && \is_file($sDir.'/'.$sFile) && '.yml' === \substr($sFile, -4))
|
||||||
{
|
{
|
||||||
$sLang = \substr($sFile, 0, -4);
|
$sLang = \substr($sFile, 0, -4);
|
||||||
if (0 < \strlen($sLang) && 'always' !== $sLang && '_source.en' !== $sLang)
|
if (0 < \strlen($sLang) && 'always' !== $sLang && '_source.en' !== $sLang)
|
||||||
|
|
|
||||||
|
|
@ -659,7 +659,7 @@ class lessc {
|
||||||
if ($suffix !== null &&
|
if ($suffix !== null &&
|
||||||
$subProp[0] == "assign" &&
|
$subProp[0] == "assign" &&
|
||||||
is_string($subProp[1]) &&
|
is_string($subProp[1]) &&
|
||||||
$subProp[1]{0} != $this->vPrefix)
|
$subProp[1][0] != $this->vPrefix)
|
||||||
{
|
{
|
||||||
$subProp[2] = array(
|
$subProp[2] = array(
|
||||||
'list', ' ',
|
'list', ' ',
|
||||||
|
|
@ -1626,7 +1626,7 @@ class lessc {
|
||||||
$this->pushEnv();
|
$this->pushEnv();
|
||||||
$parser = new lessc_parser($this, __METHOD__);
|
$parser = new lessc_parser($this, __METHOD__);
|
||||||
foreach ($args as $name => $strValue) {
|
foreach ($args as $name => $strValue) {
|
||||||
if ($name{0} != '@') $name = '@'.$name;
|
if ($name[0] != '@') $name = '@'.$name;
|
||||||
$parser->count = 0;
|
$parser->count = 0;
|
||||||
$parser->buffer = (string)$strValue;
|
$parser->buffer = (string)$strValue;
|
||||||
if (!$parser->propertyValue($value)) {
|
if (!$parser->propertyValue($value)) {
|
||||||
|
|
@ -2284,7 +2284,7 @@ class lessc_parser {
|
||||||
$hidden = true;
|
$hidden = true;
|
||||||
if (!isset($block->args)) {
|
if (!isset($block->args)) {
|
||||||
foreach ($block->tags as $tag) {
|
foreach ($block->tags as $tag) {
|
||||||
if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
|
if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
|
||||||
$hidden = false;
|
$hidden = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2338,7 +2338,7 @@ class lessc_parser {
|
||||||
protected function fixTags($tags) {
|
protected function fixTags($tags) {
|
||||||
// move @ tags out of variable namespace
|
// move @ tags out of variable namespace
|
||||||
foreach ($tags as &$tag) {
|
foreach ($tags as &$tag) {
|
||||||
if ($tag{0} == $this->lessc->vPrefix)
|
if ($tag[0] == $this->lessc->vPrefix)
|
||||||
$tag[0] = $this->lessc->mPrefix;
|
$tag[0] = $this->lessc->mPrefix;
|
||||||
}
|
}
|
||||||
return $tags;
|
return $tags;
|
||||||
|
|
@ -3068,7 +3068,7 @@ class lessc_parser {
|
||||||
protected function end() {
|
protected function end() {
|
||||||
if ($this->literal(';')) {
|
if ($this->literal(';')) {
|
||||||
return true;
|
return true;
|
||||||
} elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
|
} elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
|
||||||
// if there is end of file or a closing block next then we don't need a ;
|
// if there is end of file or a closing block next then we don't need a ;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue