Fix fatal errors and notices
This commit is contained in:
parent
425790d2fd
commit
74e5a73678
|
@ -855,6 +855,9 @@ class Transmitter
|
||||||
public static function createActivityFromMail($mail_id, $object_mode = false)
|
public static function createActivityFromMail($mail_id, $object_mode = false)
|
||||||
{
|
{
|
||||||
$mail = self::ItemArrayFromMail($mail_id);
|
$mail = self::ItemArrayFromMail($mail_id);
|
||||||
|
if (empty($mail)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$object = self::createNote($mail);
|
$object = self::createNote($mail);
|
||||||
|
|
||||||
if (!$object_mode) {
|
if (!$object_mode) {
|
||||||
|
|
|
@ -563,7 +563,7 @@ class Feed
|
||||||
$data_text = strip_tags(trim($data['text'] ?? ''));
|
$data_text = strip_tags(trim($data['text'] ?? ''));
|
||||||
$item_body = strip_tags(trim($item['body'] ?? ''));
|
$item_body = strip_tags(trim($item['body'] ?? ''));
|
||||||
|
|
||||||
if (($data_text == $item_body) || strstr($item_body, $data_text)) {
|
if (!empty($data_text) && (($data_text == $item_body) || strstr($item_body, $data_text))) {
|
||||||
$data['text'] = '';
|
$data['text'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ use Friendica\App;
|
||||||
use Friendica\Core\Config\IConfig;
|
use Friendica\Core\Config\IConfig;
|
||||||
use Friendica\Core\PConfig\IPConfig;
|
use Friendica\Core\PConfig\IPConfig;
|
||||||
use Friendica\Database\Database;
|
use Friendica\Database\Database;
|
||||||
|
use Friendica\DI;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Network\HTTPException;
|
use Friendica\Network\HTTPException;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user