From a250d8402544d5d3d37a0501e3e5b0854fc80bba Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Sun, 15 Mar 2020 22:15:36 +0300 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 +++--- .../v/0.0.0/app/libraries/lessphp/lessc.inc.php | 10 +++++----- 8 files changed, 27 insertions(+), 27 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 2a8b8ef6d..35ee65059 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 @@ -700,7 +700,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': @@ -1986,13 +1986,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; @@ -2008,7 +2008,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) @@ -2052,7 +2052,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; } @@ -2090,7 +2090,7 @@ END; while ($sLen) { - $iC = \ord($sStr{$iIndex}); + $iC = \ord($sStr[$iIndex]); if ($iC < 0x80) { $iCh = $iC; @@ -2140,7 +2140,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 9dd393f5d..f8f4b0dbf 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 @@ -102,11 +102,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 53e5db391..3ab943af4 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 @@ -156,16 +156,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 64173bed3..6dea1c527 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 @@ -111,11 +111,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 cd4e17982..f715a312b 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 @@ -325,7 +325,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 820683411..c3dc298f2 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 @@ -2687,7 +2687,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(); @@ -2704,7 +2704,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) ? @@ -3116,7 +3116,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; @@ -3283,7 +3283,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 4af4cdb87..9f7341ee4 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -9260,7 +9260,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) { @@ -9288,7 +9288,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'; } @@ -9341,7 +9341,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) diff --git a/rainloop/v/0.0.0/app/libraries/lessphp/lessc.inc.php b/rainloop/v/0.0.0/app/libraries/lessphp/lessc.inc.php index 3a185030d..22706e724 100644 --- a/rainloop/v/0.0.0/app/libraries/lessphp/lessc.inc.php +++ b/rainloop/v/0.0.0/app/libraries/lessphp/lessc.inc.php @@ -659,7 +659,7 @@ class lessc { if ($suffix !== null && $subProp[0] == "assign" && is_string($subProp[1]) && - $subProp[1]{0} != $this->vPrefix) + $subProp[1][0] != $this->vPrefix) { $subProp[2] = array( 'list', ' ', @@ -1626,7 +1626,7 @@ class lessc { $this->pushEnv(); $parser = new lessc_parser($this, __METHOD__); foreach ($args as $name => $strValue) { - if ($name{0} != '@') $name = '@'.$name; + if ($name[0] != '@') $name = '@'.$name; $parser->count = 0; $parser->buffer = (string)$strValue; if (!$parser->propertyValue($value)) { @@ -2284,7 +2284,7 @@ class lessc_parser { $hidden = true; if (!isset($block->args)) { 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; break; } @@ -2338,7 +2338,7 @@ class lessc_parser { protected function fixTags($tags) { // move @ tags out of variable namespace foreach ($tags as &$tag) { - if ($tag{0} == $this->lessc->vPrefix) + if ($tag[0] == $this->lessc->vPrefix) $tag[0] = $this->lessc->mPrefix; } return $tags; @@ -3068,7 +3068,7 @@ class lessc_parser { protected function end() { if ($this->literal(';')) { 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 ; return true; }