mirror of
https://github.com/friendica/friendica
synced 2025-04-25 22:30:10 +00:00
Fix SQL Error if no items where found + Fix setting to null
This commit is contained in:
parent
52eb2281e4
commit
56406b9910
2 changed files with 17 additions and 2 deletions
|
@ -290,7 +290,11 @@ class FileTag
|
|||
return false;
|
||||
}
|
||||
|
||||
$fields = ['file' => str_replace($pattern, null, $item['file'])];
|
||||
$fields = ['file' => str_replace($pattern, '', $item['file'])];
|
||||
if ($fields === '') {
|
||||
$fields = null;
|
||||
}
|
||||
|
||||
Item::update($fields, ['id' => $item_id]);
|
||||
|
||||
$r = q("SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue