Fix exceptions in the channel check
This commit is contained in:
parent
c649230982
commit
3f971f6dec
|
@ -87,9 +87,10 @@ class Engagement
|
||||||
|
|
||||||
$searchtext = self::getSearchTextForItem($parent);
|
$searchtext = self::getSearchTextForItem($parent);
|
||||||
if (!$store) {
|
if (!$store) {
|
||||||
$content = trim(($parent['title'] ?? '') . ' ' . ($parent['content-warning'] ?? '') . ' ' . ($parent['body'] ?? ''));
|
$content = trim(($parent['title'] ?? '') . ' ' . ($parent['content-warning'] ?? '') . ' ' . ($parent['body'] ?? ''));
|
||||||
$language = array_key_first(Item::getLanguageArray($content, 1, 0, $parent['author-id']));
|
$languages = Item::getLanguageArray($content, 1, 0, $parent['author-id']);
|
||||||
$store = DI::userDefinedChannel()->match($searchtext, $language);
|
$language = !empty($languages) ? array_key_first($languages) : '';
|
||||||
|
$store = DI::userDefinedChannel()->match($searchtext, $language);
|
||||||
}
|
}
|
||||||
|
|
||||||
$engagement = [
|
$engagement = [
|
||||||
|
|
|
@ -76,7 +76,7 @@ class Reports extends BaseModeration
|
||||||
while ($post = $this->database->fetch($posts)) {
|
while ($post = $this->database->fetch($posts)) {
|
||||||
if (in_array($post['rid'], array_keys($reports))) {
|
if (in_array($post['rid'], array_keys($reports))) {
|
||||||
$post['created'] = DateTimeFormat::local($post['created'], DateTimeFormat::MYSQL);
|
$post['created'] = DateTimeFormat::local($post['created'], DateTimeFormat::MYSQL);
|
||||||
$post['body'] = BBCode::toPlaintext($post['body']);
|
$post['body'] = BBCode::toPlaintext($post['body'] ?? '');
|
||||||
|
|
||||||
$reports[$post['rid']]['posts'][] = $post;
|
$reports[$post['rid']]['posts'][] = $post;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1749,7 +1749,8 @@ class Processor
|
||||||
}
|
}
|
||||||
|
|
||||||
$searchtext = Engagement::getSearchTextForActivity($content, $authorid, $messageTags, $receivers);
|
$searchtext = Engagement::getSearchTextForActivity($content, $authorid, $messageTags, $receivers);
|
||||||
$language = array_key_first(Item::getLanguageArray($content, 1, 0, $authorid));
|
$languages = Item::getLanguageArray($content, 1, 0, $authorid);
|
||||||
|
$language = !empty($languages) ? array_key_first($languages) : '';
|
||||||
return DI::userDefinedChannel()->match($searchtext, $language);
|
return DI::userDefinedChannel()->match($searchtext, $language);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user