Fix deleting last element from saved folder + Fix displaying empty saved folder

This commit is contained in:
Jonny Tischbein 2018-11-17 12:41:00 +01:00
parent 460c257cb4
commit 52eb2281e4
4 changed files with 12 additions and 5 deletions

View file

@ -911,7 +911,7 @@ class Item extends BaseObject
}
}
if (!empty($files)) {
if (!is_null($files)) {
Term::insertFromFileFieldByItemId($item['id'], $files);
if (!empty($item['file'])) {
DBA::update('item', ['file' => ''], ['id' => $item['id']]);