From b6b1fe7b0ef650753855ac07d222fe76d1396448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 25 Apr 2024 23:20:46 +0200 Subject: [PATCH] MEME --- lib/meme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meme.php b/lib/meme.php index 9323a46..255ad50 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -12,7 +12,7 @@ function addMeme(string $title, string $memeText, int $imageID): array echo !empty($memeText) ? "a" : "b"; echo !empty($imageID) ? "a" : "b"; echo $imageID > 0 ? "a" : "b"; - if (isLoggedIn() && fileExists($imageID) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) { + if (isLoggedIn() && fileExists($imageID, false) && !empty($title) && !empty($memeText) && !empty($imageID) && $imageID > 0) { $stmtMemeAdd = $mysqli->prepare('INSERT INTO Memes (AuthorID, Title, TextContent, FileID) VALUES (?, ?, ?, ?)'); $stmtMemeAdd->bind_param('issi', $_SESSION['ID'], htmlspecialchars($title), htmlspecialchars($memeText), $imageID); if($stmtMemeAdd->execute() && $stmtMemeAdd->affected_rows > 0) {