fix: add string as return for getCover and make sure to not pass false to fseek
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
cbbd6b306b
commit
c75f4e0a39
@ -233,7 +233,7 @@ class Mp3Info {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool|null
|
* @return bool|null|string
|
||||||
*/
|
*/
|
||||||
public function getCover()
|
public function getCover()
|
||||||
{
|
{
|
||||||
@ -242,6 +242,9 @@ class Mp3Info {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$fp = fopen($this->_fileName, 'rb');
|
$fp = fopen($this->_fileName, 'rb');
|
||||||
|
if ($fp === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
fseek($fp, $this->coverProperties['offset']);
|
fseek($fp, $this->coverProperties['offset']);
|
||||||
$data = fread($fp, $this->coverProperties['size']);
|
$data = fread($fp, $this->coverProperties['size']);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user