mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 09:20:58 +01:00
Handle NULL files in class Post
This commit is contained in:
parent
8db4baccca
commit
46ba60fff1
@ -360,6 +360,7 @@ class Post {
|
||||
if (isset($this->files) && $this->files) {
|
||||
$this->files = is_string($this->files) ? json_decode($this->files) : $this->files;
|
||||
// Compatibility for posts before individual file hashing
|
||||
if ($this->files) {
|
||||
foreach ($this->files as $i => &$file) {
|
||||
if (empty($file)) {
|
||||
unset($this->files[$i]);
|
||||
@ -369,6 +370,7 @@ class Post {
|
||||
$file->hash = $this->filehash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->subject = utf8tohtml($this->subject);
|
||||
$this->name = utf8tohtml($this->name);
|
||||
|
Loading…
Reference in New Issue
Block a user