1
0
Fork 0

Merge pull request #11662 from MrPetovan/bug/11661-splitattachment-null

Ensure parameter 4 of Post\Media::splitAttachment is a boolean value
This commit is contained in:
Tobias Diekershoff 2022-06-21 06:48:52 +02:00 committed by GitHub
commit 4650ff53d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2831,7 +2831,8 @@ class Item
$shared_uri_id = 0;
$shared_links = [];
}
$attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'] ?? '', $shared_links, $item['has-media']);
$attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'] ?? '', $shared_links, $item['has-media'] ?? false);
$item['body'] = self::replaceVisualAttachments($attachments, $item['body'] ?? '');
$item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", "\n", $item['body']);