mirror of
https://github.com/friendica/friendica
synced 2024-11-19 15:03:40 +00:00
Fix notice in Item::deleteById
This commit is contained in:
parent
18eb13a598
commit
633a71ec97
1 changed files with 3 additions and 1 deletions
|
@ -801,7 +801,9 @@ class Item extends BaseObject
|
|||
// If item has attachments, drop them
|
||||
foreach (explode(", ", $item['attach']) as $attach) {
|
||||
preg_match("|attach/(\d+)|", $attach, $matches);
|
||||
dba::delete('attach', ['id' => $matches[1], 'uid' => $item['uid']]);
|
||||
if (is_array($matches) && count($matches) > 1) {
|
||||
dba::delete('attach', ['id' => $matches[1], 'uid' => $item['uid']]);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete tags that had been attached to other items
|
||||
|
|
Loading…
Reference in a new issue