Skip to content

Commit 13d1c14

Browse files
committed
Fixing #25: implode on php8
1 parent 752935f commit 13d1c14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Mp3Info.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private function parseAudio($filename, $fileSize, $mode) {
285285
array_walk($sizeBytes, function (&$value) {
286286
$value = substr(str_pad(base_convert($value, 10, 2), 8, 0, STR_PAD_LEFT), 1);
287287
});
288-
$size = bindec(implode(null, $sizeBytes)) + 10;
288+
$size = bindec(implode($sizeBytes)) + 10;
289289
$audioSize -= ($this->_id3Size = $size);
290290
}
291291
}
@@ -396,19 +396,19 @@ private function readMpegFrame($fp) {
396396

397397
// VBR frames count presence
398398
if (($flagsBytes[3] & 2)) {
399-
$this->vbrProperties['frames'] = implode(null, unpack('N', fread($fp, 4)));
399+
$this->vbrProperties['frames'] = implode(unpack('N', fread($fp, 4)));
400400
}
401401
// VBR stream size presence
402402
if ($flagsBytes[3] & 4) {
403-
$this->vbrProperties['bytes'] = implode(null, unpack('N', fread($fp, 4)));
403+
$this->vbrProperties['bytes'] = implode(unpack('N', fread($fp, 4)));
404404
}
405405
// VBR TOC presence
406406
if ($flagsBytes[3] & 1) {
407407
fseek($fp, 100, SEEK_CUR);
408408
}
409409
// VBR quality
410410
if ($flagsBytes[3] & 8) {
411-
$this->vbrProperties['quality'] = implode(null, unpack('N', fread($fp, 4)));
411+
$this->vbrProperties['quality'] = implode(unpack('N', fread($fp, 4)));
412412
}
413413
}
414414

@@ -546,7 +546,7 @@ private function readId3v2Body($fp)
546546
array_walk($sizes, function (&$value) {
547547
$value = substr($value, 1);
548548
});
549-
$size = implode("", $sizes);
549+
$size = implode($sizes);
550550
$size = bindec($size);
551551

552552
if ($this->id3v2MajorVersion == 2) {

0 commit comments

Comments
 (0)