From 8dd8f9390e9b2390cb359ec524c0e9afb1ec61bf Mon Sep 17 00:00:00 2001 From: 8chan Date: Tue, 5 May 2015 22:41:21 -0700 Subject: [PATCH] Prevent bug in enumerating bans when post json is empty --- inc/bans.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/bans.php b/inc/bans.php index 3e9eb9cf..b4f45149 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -187,7 +187,9 @@ class Bans { if ($ban['post']) { $post = json_decode($ban['post']); - $ban['message'] = $post->body; + if ($post) { + $ban['message'] = $post->body; + } } unset($ban['ipstart'], $ban['ipend'], $ban['post'], $ban['creator']);