From ffe855222ecc573c622891104caa2c5fea451fe7 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sun, 14 Jul 2024 19:13:51 +0200 Subject: [PATCH] bans.php: do not deserialize post that does not exist --- inc/bans.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/bans.php b/inc/bans.php index 8566eb04..8df9ae97 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -85,7 +85,9 @@ class Bans { if ($query->rowCount() == 0) { return null; } else { - $ret['post'] = json_decode($ret['post'], true); + if ($ret['post']) { + $ret['post'] = json_decode($ret['post'], true); + } return $ret; } }