From 7a247f38ae73e982eb4fd91517320877eec2f3f9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 15 May 2025 19:42:46 +0500 Subject: fix: uploader_by wasn't set properly --- src/emote.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emote.php b/src/emote.php index 170a991..7e589e4 100644 --- a/src/emote.php +++ b/src/emote.php @@ -109,13 +109,14 @@ function fetch_all_emotes_from_emoteset(PDO &$db, string $emote_set_id, string $ $emotes = $stmt->fetchAll(PDO::FETCH_ASSOC); // fetching uploaders - foreach ($emotes as $e) { + foreach ($emotes as &$e) { if ($e["uploaded_by"]) { $stmt = $db->prepare("SELECT id, username FROM users WHERE id = ?"); $stmt->execute([$e["uploaded_by"]]); $e["uploaded_by"] = $stmt->fetch(PDO::FETCH_ASSOC); } + unset($e); } return $emotes; -- cgit v1.2.3