Browse Source

Fix: Ensure that the value is set.

pull/5328/head
Michael 3 years ago
parent
commit
afa194200b
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/Model/Item.php

+ 7
- 1
src/Model/Item.php View File

@ -752,7 +752,7 @@ class Item extends BaseObject
if (!empty($item['plink'])) {
$content_fields['plink'] = $item['plink'];
}
if ((self::activityToIndex($item['verb']) >= 0) || !empty($item['iaid'])) {
if (!empty($item['iaid']) || (!empty($content_fields['verb']) && (self::activityToIndex($content_fields['verb']) >= 0))) {
self::updateActivity($content_fields, ['uri' => $item['uri']]);
if (empty($item['iaid'])) {
@ -768,6 +768,12 @@ class Item extends BaseObject
dba::delete('item-content', ['id' => $item['icid']]);
}
}
} elseif (!empty($item['icid'])) {
dba::update('item', ['icid' => null], ['id' => $item['id']]);
if (!dba::exists('item', ['icid' => $item['icid']])) {
dba::delete('item-content', ['id' => $item['icid']]);
}
}
} else {
self::updateContent($content_fields, ['uri' => $item['uri']]);


Loading…
Cancel
Save