diff --git a/inc/display.php b/inc/display.php index 9561c4b8..929f2a91 100644 --- a/inc/display.php +++ b/inc/display.php @@ -357,9 +357,14 @@ class Post { if (isset($this->files) && $this->files) { $this->files = json_decode($this->files); // Compatibility for posts before individual file hashing - foreach ($this->files as &$file) + foreach ($this->files as $i => &$file) { + if (empty($file)) { + unset($this->files[$i]); + continue; + } if (!isset($file->hash)) $file->hash = $this->filehash; + } } $this->subject = utf8tohtml($this->subject);