From 27726d6c2b6366467879c0690870b7a232d963e9 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sat, 13 Jul 2024 11:31:15 +0200 Subject: [PATCH] display.php: handle post already having an array (PHP 8.0 fix) --- inc/display.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/display.php b/inc/display.php index 0d4ad445..00b58f89 100644 --- a/inc/display.php +++ b/inc/display.php @@ -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);