From 408e9ce30ed7a13377ad6666ae822cecca673931 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Mon, 26 Feb 2024 14:18:20 -0500 Subject: [PATCH] Fix posting images - since we return the new post html now, we need the Post class to not try and decode files as json, since we're not loading that class from the db anymore. --- inc/display.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/display.php b/inc/display.php index 3211456f..43b54063 100644 --- a/inc/display.php +++ b/inc/display.php @@ -395,8 +395,10 @@ class Post extends PostProps { $this->$key = $value; } - if (isset($this->files) && $this->files) + if (isset($this->files) && $this->files + && is_string($this->files)) { $this->files = @json_decode($this->files); + } $this->subject = utf8tohtml($this->subject); $this->name = utf8tohtml($this->name);