Merge pull request #16 from dumijay/patch-1
Changed deprecated {} to [] to access array elements
This commit is contained in:
commit
85e3aff9ee
1 changed files with 5 additions and 5 deletions
|
@ -374,7 +374,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 +390,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));
|
||||
|
@ -793,7 +793,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;
|
||||
|
@ -932,7 +932,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;
|
||||
}
|
||||
|
@ -966,4 +966,4 @@ class Net_IDNA_php4 extends idna_convert
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue