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

Commit 69a08a5

Browse files
author
Flo Faber
committed
Fixed DB::get_picture not returning false on error
1 parent 8576c63 commit 69a08a5

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
@@ -226,7 +226,8 @@ public function get_picture(string $uri, bool $include_binary = true)
226226
do{
227227

228228
$picture_data = $this->mphpd->cmd("readpicture", [$uri, $offset]);
229-
if($picture_data === false || $picture_data === []){ return [ "size" => 0, "type" => null, "binary" => null ]; }
229+
if($picture_data === false){ return false; }
230+
if($picture_data === []){ return [ "size" => 0, "type" => null, "binary" => null ]; }
230231

231232
$size = $picture_data["size"];
232233
$type = $picture_data["type"];

0 commit comments

Comments
 (0)