Fix PHP 7.4 deprecation: array/string curly braces access (#6884)

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
pull/6894/head
Jack Cherng 5 years ago committed by Aleksander Machniak
parent 9a225bd3fe
commit 17d8423299

@ -493,21 +493,21 @@ class rcube_tnef_decoder
$length_preload = strlen($preload); $length_preload = strlen($preload);
for ($cnt = 0; $cnt < $length_preload; $cnt++) { for ($cnt = 0; $cnt < $length_preload; $cnt++) {
$uncomp .= $preload{$cnt}; $uncomp .= $preload[$cnt];
++$out; ++$out;
} }
while ($out < ($size + $length_preload)) { while ($out < ($size + $length_preload)) {
if (($flag_count++ % 8) == 0) { if (($flag_count++ % 8) == 0) {
$flags = ord($data{$in++}); $flags = ord($data[$in++]);
} }
else { else {
$flags = $flags >> 1; $flags = $flags >> 1;
} }
if (($flags & 1) != 0) { if (($flags & 1) != 0) {
$offset = ord($data{$in++}); $offset = ord($data[$in++]);
$length = ord($data{$in++}); $length = ord($data[$in++]);
$offset = ($offset << 4) | ($length >> 4); $offset = ($offset << 4) | ($length >> 4);
$length = ($length & 0xF) + 2; $length = ($length & 0xF) + 2;
$offset = ((int)($out / 4096)) * 4096 + $offset; $offset = ((int)($out / 4096)) * 4096 + $offset;
@ -524,7 +524,7 @@ class rcube_tnef_decoder
} }
} }
else { else {
$uncomp .= $data{$in++}; $uncomp .= $data[$in++];
++$out; ++$out;
} }
} }

Loading…
Cancel
Save