From a507b507a5a9da9bf0e8a4df5d286fdb75ba3bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 23:25:43 +0200 Subject: [PATCH] MEME --- lib/upload.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/upload.php b/lib/upload.php index 56129e4..0365cde 100644 --- a/lib/upload.php +++ b/lib/upload.php @@ -184,7 +184,6 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string $onlyMine = true; } $query = 'SELECT Path FROM Files WHERE ID = ?' . ($onlyMine ? ' AND UploadedBy = ?' : ''); - echo $query; $stmtfileexists = $mysqli->prepare($query); if ($onlyMine) { $stmtfileexists->bind_param('ii', $fileId, $_SESSION['id']); @@ -194,7 +193,7 @@ function fileExists(int $fileId, bool $onlyMine = true): bool|string $filePath = ""; $stmtfileexists->bind_result($filePath); $stmtfileexists->execute(); - if (!empty($filePath)){ + if ($stmtfileexists->num_rows > 0){ return $filePath; } else {