Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 1973481

Browse files
author
Flo Faber
committed
Fixed #17
1 parent cbfe0c5 commit 1973481

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/DB.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function read_comments(string $uri)
207207
/**
208208
* Returns a picture of `$uri` by reading embedded pictures from binary tags.
209209
* @param string $uri Song URI.
210-
* @return false|string binary-data `string` on success and `false` on failure.
210+
* @return false|string `false` on failure otherwise `string` containing either the picture or an empty string in case the file does not contain a picture.
211211
*/
212212
public function read_picture(string $uri)
213213
{
@@ -217,6 +217,7 @@ public function read_picture(string $uri)
217217

218218
$aa = $this->mphpd->cmd("readpicture", [$uri, $offset]);
219219
if($aa === false){ return false; }
220+
if(!isset($aa["size"])){ return ""; }
220221

221222
$binary_size = $aa["size"];
222223

0 commit comments

Comments
 (0)