-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace curly braces for PHP 7.4 compatibility (#25782)
- Loading branch information
Showing
20 changed files
with
60 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
* @author Matthias Sommerfeld <[email protected]> | ||
* @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de | ||
* @version 0.8.0 2011-03-11 | ||
* @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. | ||
*/ | ||
class idna_convert | ||
{ | ||
|
@@ -418,7 +419,7 @@ protected function _decode($encoded) | |
$delim_pos = strrpos($encoded, '-'); | ||
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]); | ||
} | ||
} | ||
$deco_len = count($decoded); | ||
|
@@ -432,7 +433,7 @@ protected function _decode($encoded) | |
|
||
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->_decode_digit($encoded{$enco_idx++}); | ||
$digit = $this->_decode_digit($encoded[$enco_idx++]); | ||
$idx += $digit * $w; | ||
$t = ($k <= $bias) ? $this->_tmin : | ||
(($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); | ||
|
@@ -823,7 +824,7 @@ protected function _utf8_to_ucs4($input) | |
$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; | ||
++$out_len; | ||
|
@@ -954,7 +955,7 @@ protected function _ucs4_string_to_ucs4($input) | |
$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; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
* @author Matthias Sommerfeld <[email protected]> | ||
* @copyright 2003-2009 phlyLabs Berlin, http://phlylabs.de | ||
* @version 0.0.6 2009-05-10 | ||
* @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. | ||
*/ | ||
class uctc { | ||
private static $mechs = array('ucs4', /*'ucs4le', 'ucs4be', */'ucs4array', /*'utf16', 'utf16le', 'utf16be', */'utf8', 'utf7', 'utf7imap'); | ||
|
@@ -59,7 +60,7 @@ private static function utf8_ucs4array($input) | |
$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; | ||
|
@@ -176,7 +177,7 @@ private static function utf7_ucs4array($input, $sc = '+') | |
$b64 = ''; | ||
|
||
for ($k = 0; $k < $inp_len; ++$k) { | ||
$c = $input{$k}; | ||
$c = $input[$k]; | ||
if (0 == ord($c)) continue; // Ignore zero bytes | ||
if ('b' == $mode) { | ||
// Sequence got terminated | ||
|
@@ -193,10 +194,10 @@ private static function utf7_ucs4array($input, $sc = '+') | |
$tmp = substr($tmp, -1 * (strlen($tmp) % 2)); | ||
for ($i = 0; $i < strlen($tmp); $i++) { | ||
if ($i % 2) { | ||
$output[$out_len] += ord($tmp{$i}); | ||
$output[$out_len] += ord($tmp[$i]); | ||
$out_len++; | ||
} else { | ||
$output[$out_len] = ord($tmp{$i}) << 8; | ||
$output[$out_len] = ord($tmp[$i]) << 8; | ||
} | ||
} | ||
$mode = 'd'; | ||
|
@@ -292,7 +293,7 @@ private static function ucs4_ucs4array($input) | |
$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; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.