diff --git a/lib/meme.php b/lib/meme.php index 918121e..295976f 100644 --- a/lib/meme.php +++ b/lib/meme.php @@ -29,6 +29,7 @@ function addMeme(string $title, string $memeText, int $imageID): array function executeAndRenderMemes(mysqli_stmt $stmt): string { global $routerConfig; $stmt->execute(); + $stmt->store_result(); $stmt->bind_result($memeID, $title, $textContent, $createdAt, $authorID, $filePath, $imageWidth, $imageHeight, $userNickname); $memes_out = ''; @@ -168,7 +169,6 @@ function renderMemeGallery(?int $offset = null, ?int $authorId = null, ?int $mem $stmt = $mysqli->prepare($query); $stmt->bind_param($types, ...$params); - $stmt->store_result(); return executeAndRenderMemes($stmt); }