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.
This commit is contained in:
towards-a-new-leftypol 2024-02-26 14:18:20 -05:00
parent 7838520c63
commit cb7c818996
1 changed files with 3 additions and 1 deletions

View File

@ -395,8 +395,10 @@ class Post extends PostProps {
$this->$key = $value; $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->files = @json_decode($this->files);
}
$this->subject = utf8tohtml($this->subject); $this->subject = utf8tohtml($this->subject);
$this->name = utf8tohtml($this->name); $this->name = utf8tohtml($this->name);