display.php: handle post already having an array (PHP 8.0 fix)

This commit is contained in:
Zankaria 2024-07-13 11:31:15 +02:00
parent 582a08eee4
commit 27726d6c2b

View file

@ -313,8 +313,9 @@ class Post {
$this->{$key} = $value;
}
if (isset($this->files) && $this->files)
if (isset($this->files) && $this->files && !is_array($this->files)) {
$this->files = json_decode($this->files);
}
$this->subject = utf8tohtml($this->subject);
$this->name = utf8tohtml($this->name);