diff --git a/.travis.yml b/.travis.yml index c17e91b..cd6689d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ jobs: script: - php vendor/bin/php-cs-fixer fix --dry-run --diff - composer validate + - find OLE* -type f -name \*.php | xargs -n1 php -l cache: directories: diff --git a/OLE.php b/OLE.php index 1e4a4d2..e25b5ae 100755 --- a/OLE.php +++ b/OLE.php @@ -513,7 +513,7 @@ static function Asc2Ucs($ascii) { $rawname = ''; for ($i = 0; $i < strlen($ascii); $i++) { - $rawname .= $ascii{$i} . "\x00"; + $rawname .= $ascii[$i] . "\x00"; } return $rawname; } @@ -582,14 +582,14 @@ static function OLE2LocalDate($string) $factor = pow(2,32); $high_part = 0; for ($i = 0; $i < 4; $i++) { - list(, $high_part) = unpack('C', $string{(7 - $i)}); + list(, $high_part) = unpack('C', $string[(7 - $i)]); if ($i < 3) { $high_part *= 0x100; } } $low_part = 0; for ($i = 4; $i < 8; $i++) { - list(, $low_part) = unpack('C', $string{(7 - $i)}); + list(, $low_part) = unpack('C', $string[(7 - $i)]); if ($i < 7) { $low_part *= 0x100; }