From 7eb1defa16227365284ad9faf45dd27cbf9d74f7 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 16 Mar 2020 14:27:17 +0100 Subject: [PATCH] Fix PHP 7.4 Deprecate message --- .../v/0.0.0/app/libraries/MailSo/Base/Utils.php | 14 +++++++------- .../v/0.0.0/app/libraries/MailSo/Mime/Email.php | 4 ++-- .../app/libraries/MailSo/Mime/EmailCollection.php | 6 +++--- .../v/0.0.0/app/libraries/MailSo/Mime/EmailDep.php | 4 ++-- .../libraries/MailSo/Sieve/ManageSieveClient.php | 2 +- .../app/libraries/MailSo/Vendors/Net/IDNA2.php | 8 ++++---- .../v/0.0.0/app/libraries/RainLoop/Actions.php | 6 +++--- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Base/Utils.php b/rainloop/v/0.0.0/app/libraries/MailSo/Base/Utils.php index 542271e55..981b31fa9 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Base/Utils.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Base/Utils.php @@ -487,7 +487,7 @@ END; { $iPos = \strpos($aTempArr[1], '?', 2); $aTempArr[0] = \substr($aTempArr[1], 2, $iPos - 2); - $sEncType = \strtoupper($aTempArr[1]{$iPos + 1}); + $sEncType = \strtoupper($aTempArr[1][$iPos + 1]); switch ($sEncType) { case 'Q': @@ -1591,13 +1591,13 @@ END; for ($iIndex = 0; $iLen > 0; $iIndex++, $iLen--) { - $sChar = $sStr{$iIndex}; + $sChar = $sStr[$iIndex]; if ($sChar == '&') { $iIndex++; $iLen--; - $sChar = isset($sStr{$iIndex}) ? $sStr{$iIndex} : null; + $sChar = isset($sStr[$iIndex]) ? $sStr[$iIndex] : null; if ($sChar === null) { break; @@ -1613,7 +1613,7 @@ END; $iK = 10; for (; $iLen > 0; $iIndex++, $iLen--) { - $sChar = $sStr{$iIndex}; + $sChar = $sStr[$iIndex]; $iB = $aArray[\ord($sChar)]; if ((\ord($sChar) & 0x80) || $iB == -1) @@ -1657,7 +1657,7 @@ END; if (($iCh || $iK < 6) || (!$iLen || $sChar != '-') || - ($iLen > 2 && '&' === $sStr{$iIndex+1} && '-' !== $sStr{$iIndex+2})) + ($iLen > 2 && '&' === $sStr[$iIndex+1] && '-' !== $sStr[$iIndex+2])) { return $bError; } @@ -1690,7 +1690,7 @@ END; while ($sLen) { - $iC = \ord($sStr{$iIndex}); + $iC = \ord($sStr[$iIndex]); if ($iC < 0x80) { $iCh = $iC; @@ -1740,7 +1740,7 @@ END; for ($iJ = 0; $iJ < $iN; $iJ++) { - $iO = \ord($sStr{$iIndex+$iJ}); + $iO = \ord($sStr[$iIndex+$iJ]); if (($iO & 0xc0) != 0x80) { return $bError; diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/Email.php b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/Email.php index 517d53fd8..778934057 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/Email.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/Email.php @@ -89,11 +89,11 @@ class Email while ($iCurrentIndex < \strlen($sEmailAddress)) { - switch ($sEmailAddress{$iCurrentIndex}) + switch ($sEmailAddress[$iCurrentIndex]) { // case '\'': case '"': -// $sQuoteChar = $sEmailAddress{$iCurrentIndex}; +// $sQuoteChar = $sEmailAddress[$iCurrentIndex]; if ((!$bInName) && (!$bInAddress) && (!$bInComment)) { $bInName = true; diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php index e709d938e..9a8b86771 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php @@ -119,16 +119,16 @@ class EmailCollection extends \MailSo\Base\Collection while ($iCurrentPos < $sWorkingRecipientsLen) { - switch ($sWorkingRecipients{$iCurrentPos}) + switch ($sWorkingRecipients[$iCurrentPos]) { case '\'': case '"': if (!$bIsInQuotes) { - $sChQuote = $sWorkingRecipients{$iCurrentPos}; + $sChQuote = $sWorkingRecipients[$iCurrentPos]; $bIsInQuotes = true; } - else if ($sChQuote == $sWorkingRecipients{$iCurrentPos}) + else if ($sChQuote == $sWorkingRecipients[$iCurrentPos]) { $bIsInQuotes = false; } diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailDep.php b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailDep.php index c5fdb590f..6f1a374fc 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailDep.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Mime/EmailDep.php @@ -96,11 +96,11 @@ class EmailDep while ($iCurrentIndex < \strlen($sEmailAddress)) { - switch ($sEmailAddress{$iCurrentIndex}) + switch ($sEmailAddress[$iCurrentIndex]) { // case '\'': case '"': -// $sQuoteChar = $sEmailAddress{$iCurrentIndex}; +// $sQuoteChar = $sEmailAddress[$iCurrentIndex]; if ((!$bInName) && (!$bInAddress) && (!$bInComment)) { $bInName = true; diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Sieve/ManageSieveClient.php b/rainloop/v/0.0.0/app/libraries/MailSo/Sieve/ManageSieveClient.php index ea4e9464d..3f8143641 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Sieve/ManageSieveClient.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Sieve/ManageSieveClient.php @@ -273,7 +273,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient $sScript = ''; if (\is_array($mResponse) && 0 < \count($mResponse)) { - if ('{' === $mResponse[0]{0}) + if ('{' === $mResponse[0][0]) { \array_shift($mResponse); } diff --git a/rainloop/v/0.0.0/app/libraries/MailSo/Vendors/Net/IDNA2.php b/rainloop/v/0.0.0/app/libraries/MailSo/Vendors/Net/IDNA2.php index 9743e9b81..c0a985e79 100644 --- a/rainloop/v/0.0.0/app/libraries/MailSo/Vendors/Net/IDNA2.php +++ b/rainloop/v/0.0.0/app/libraries/MailSo/Vendors/Net/IDNA2.php @@ -2622,7 +2622,7 @@ class Net_IDNA2 if ($delim_pos > self::_byteLength($this->_punycode_prefix)) { for ($k = self::_byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) { - $decoded[] = ord($encoded{$k}); + $decoded[] = ord($encoded[$k]); } } else { $decoded = array(); @@ -2639,7 +2639,7 @@ class Net_IDNA2 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) { - $digit = $this->_decodeDigit($encoded{$enco_idx++}); + $digit = $this->_decodeDigit($encoded[$enco_idx++]); $idx += $digit * $w; $t = ($k <= $bias) ? @@ -3006,7 +3006,7 @@ class Net_IDNA2 $mode = 'next'; $test = 'none'; 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 $output[$out_len] = $v; @@ -3161,7 +3161,7 @@ class Net_IDNA2 $out_len++; $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; } diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index cd971dca6..70dfa43b3 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -7866,7 +7866,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack { 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) { @@ -7894,7 +7894,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack { 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'; } @@ -7944,7 +7944,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack { 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); if (0 < \strlen($sLang) && 'always' !== $sLang && '_source.en' !== $sLang)