diff --git a/lib/upload.php b/lib/upload.php index 31de1f8..b5a606f 100644 --- a/lib/upload.php +++ b/lib/upload.php @@ -191,10 +191,10 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string $stmtfileexists->bind_param('i', $fileId); } $filePath = ""; - $id = 0; + $id = -1; $stmtfileexists->bind_result($id, $filePath); $stmtfileexists->execute(); - if ($stmtfileexists->num_rows > 0){ + if ($id != -1){ return $filePath; } else {