diff options
| author | lsces <lester@lsces.co.uk> | 2026-03-27 09:44:59 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-03-27 09:44:59 +0000 |
| commit | 00091c883786125dfbb233125d8c74a51aa21434 (patch) | |
| tree | f3363e1c0f785ee0f68ad686089890a90ccf6000 /includes | |
| parent | cf748477dfc490e5cc8a936816d747d24a4f720b (diff) | |
| download | util-00091c883786125dfbb233125d8c74a51aa21434.tar.gz util-00091c883786125dfbb233125d8c74a51aa21434.tar.bz2 util-00091c883786125dfbb233125d8c74a51aa21434.zip | |
Legacy code tweaks to simplepie library, but need to switch to current build
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/simplepie/idn/idna_convert.class.php | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/includes/simplepie/idn/idna_convert.class.php b/includes/simplepie/idn/idna_convert.class.php index ed2bae2..9539a15 100644 --- a/includes/simplepie/idn/idna_convert.class.php +++ b/includes/simplepie/idn/idna_convert.class.php @@ -60,7 +60,7 @@ class idna_convert * @var array * @access private */ - var $NP = array(); + var $NP = []; // Internal settings, do not mess with them var $_punycode_prefix = 'xn--'; @@ -344,7 +344,6 @@ class idna_convert /** * Use this method to get the last error ocurred - * @param void * @return string The last error, that occured * @access public */ @@ -374,7 +373,7 @@ class idna_convert $delim_pos = strrpos($encoded, '-'); if ($delim_pos > strlen($this->_punycode_prefix)) { for ($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k) { - $decoded[] = ord($encoded{$k}); + $decoded[] = ord($encoded[$k]); } } else { $decoded = array(); @@ -390,7 +389,7 @@ class idna_convert 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)); @@ -745,7 +744,7 @@ class idna_convert /** * Do composition of a sequence of starter and non-starter * @param array UCS4 Decomposed sequence - * @return array Ordered USC4 sequence + * @return array|bool Ordered USC4 sequence * @access private */ function _combine($input) @@ -793,7 +792,7 @@ class idna_convert $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; @@ -917,7 +916,7 @@ class idna_convert */ function _ucs4_string_to_ucs4($input) { - $output = array(); + $output = []; $inp_len = strlen($input); // Input length must be dividable by 4 if ($inp_len % 4) { @@ -932,7 +931,7 @@ class idna_convert $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; } @@ -964,6 +963,4 @@ class Net_IDNA_php4 extends idna_convert { return $this->IC->set_parameters($option, $param); } -} - -?>
\ No newline at end of file +}
\ No newline at end of file |
