Skip to content

Commit

Permalink
Fixing #25: implode on php8
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Jun 15, 2022
1 parent 752935f commit 13d1c14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Mp3Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private function parseAudio($filename, $fileSize, $mode) {
array_walk($sizeBytes, function (&$value) {
$value = substr(str_pad(base_convert($value, 10, 2), 8, 0, STR_PAD_LEFT), 1);
});
$size = bindec(implode(null, $sizeBytes)) + 10;
$size = bindec(implode($sizeBytes)) + 10;
$audioSize -= ($this->_id3Size = $size);
}
}
Expand Down Expand Up @@ -396,19 +396,19 @@ private function readMpegFrame($fp) {

// VBR frames count presence
if (($flagsBytes[3] & 2)) {
$this->vbrProperties['frames'] = implode(null, unpack('N', fread($fp, 4)));
$this->vbrProperties['frames'] = implode(unpack('N', fread($fp, 4)));
}
// VBR stream size presence
if ($flagsBytes[3] & 4) {
$this->vbrProperties['bytes'] = implode(null, unpack('N', fread($fp, 4)));
$this->vbrProperties['bytes'] = implode(unpack('N', fread($fp, 4)));
}
// VBR TOC presence
if ($flagsBytes[3] & 1) {
fseek($fp, 100, SEEK_CUR);
}
// VBR quality
if ($flagsBytes[3] & 8) {
$this->vbrProperties['quality'] = implode(null, unpack('N', fread($fp, 4)));
$this->vbrProperties['quality'] = implode(unpack('N', fread($fp, 4)));
}
}

Expand Down Expand Up @@ -546,7 +546,7 @@ private function readId3v2Body($fp)
array_walk($sizes, function (&$value) {
$value = substr($value, 1);
});
$size = implode("", $sizes);
$size = implode($sizes);
$size = bindec($size);

if ($this->id3v2MajorVersion == 2) {
Expand Down

0 comments on commit 13d1c14

Please sign in to comment.