From 64ee5ff9c43b46e6d76f97af4fa2789cd9ea43b3 Mon Sep 17 00:00:00 2001 From: Cflip <36554078+cflip@users.noreply.github.com> Date: Thu, 28 Jan 2021 11:15:59 -0700 Subject: Fixes and style changes --- thread.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'thread.php') diff --git a/thread.php b/thread.php index 7eb0e88..d6d01f8 100644 --- a/thread.php +++ b/thread.php @@ -15,6 +15,10 @@ function add_quote($dbc, $thread_id, $matches) { $reply = mysqli_fetch_assoc($result); + if (empty($reply)) { + return '
Invalid quote!'; + } + return '
Quote from ' . $reply['user_name'] . ''; } } @@ -69,7 +73,7 @@ if (mysqli_num_rows($result) == 0) { '
' . $reply['post_content'] . '