From 0c8ea349cadc84b78039fbf99b6db15afb430499 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sat, 13 Jul 2024 11:39:29 +0200 Subject: [PATCH] display.php: handle thread already having an array (PHP 8.0 fix) --- inc/display.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/display.php b/inc/display.php index 00b58f89..f9043656 100644 --- a/inc/display.php +++ b/inc/display.php @@ -364,8 +364,9 @@ class Thread { $this->{$key} = $value; } - if (isset($this->files)) - $this->files = @json_decode($this->files); + if (isset($this->files) && !is_array($this->files)) { + $this->files = json_decode($this->files); + } $this->subject = utf8tohtml($this->subject); $this->name = utf8tohtml($this->name);