fail gracefully on no thumbnail
This commit is contained in:
parent
8a46c7a0d5
commit
d2bb4a776f
@ -1161,8 +1161,10 @@ function deleteFile($id, $remove_entirely_if_already=true, $file=null) {
|
||||
foreach ($files as $i => $f) {
|
||||
if (($file !== false && $i == $file) || $file === null) {
|
||||
// Delete thumbnail
|
||||
if (isset ($f->thumb) && $f->thumb) {
|
||||
file_unlink($board['dir'] . $config['dir']['thumb'] . $f->thumb);
|
||||
unset($files[$i]->thumb);
|
||||
}
|
||||
|
||||
// Delete file
|
||||
file_unlink($board['dir'] . $config['dir']['img'] . $f->file);
|
||||
|
Loading…
Reference in New Issue
Block a user