mirror of
https://github.com/friendica/friendica
synced 2025-04-29 01:04:28 +02:00
Fix exceptions in the channel check
This commit is contained in:
parent
c649230982
commit
3f971f6dec
3 changed files with 7 additions and 5 deletions
|
@ -87,9 +87,10 @@ class Engagement
|
|||
|
||||
$searchtext = self::getSearchTextForItem($parent);
|
||||
if (!$store) {
|
||||
$content = trim(($parent['title'] ?? '') . ' ' . ($parent['content-warning'] ?? '') . ' ' . ($parent['body'] ?? ''));
|
||||
$language = array_key_first(Item::getLanguageArray($content, 1, 0, $parent['author-id']));
|
||||
$store = DI::userDefinedChannel()->match($searchtext, $language);
|
||||
$content = trim(($parent['title'] ?? '') . ' ' . ($parent['content-warning'] ?? '') . ' ' . ($parent['body'] ?? ''));
|
||||
$languages = Item::getLanguageArray($content, 1, 0, $parent['author-id']);
|
||||
$language = !empty($languages) ? array_key_first($languages) : '';
|
||||
$store = DI::userDefinedChannel()->match($searchtext, $language);
|
||||
}
|
||||
|
||||
$engagement = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue