php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용

This commit is contained in:
thisgun
2021-01-04 15:39:15 +09:00
parent 131b170b54
commit 27e9af5e42
1009 changed files with 12120 additions and 10849 deletions

View File

@ -523,8 +523,8 @@ class PHPExcel_Shared_String
if (strlen($str) < 2) {
return $str;
}
$c0 = ord($str{0});
$c1 = ord($str{1});
$c0 = ord($str[0]);
$c1 = ord($str[1]);
if ($c0 == 0xfe && $c1 == 0xff) {
$str = substr($str, 2);
} elseif ($c0 == 0xff && $c1 == 0xfe) {
@ -535,11 +535,11 @@ class PHPExcel_Shared_String
$newstr = '';
for ($i=0; $i<$len; $i+=2) {
if ($bom_be) {
$val = ord($str{$i}) << 4;
$val += ord($str{$i+1});
$val = ord($str[$i]) << 4;
$val += ord($str[$i+1]);
} else {
$val = ord($str{$i+1}) << 4;
$val += ord($str{$i});
$val = ord($str[$i+1]) << 4;
$val += ord($str[$i]);
}
$newstr .= ($val == 0x228) ? "\n" : chr($val);
}