mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-09 21:44:37 +02:00
[VkBridge] Handle empty posts before fixing image links (#3052)
This commit is contained in:
parent
6cd8b90d28
commit
2db523a37a
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ class VkBridge extends BridgeAbstract
|
||||||
$item = [];
|
$item = [];
|
||||||
$content = strip_tags(backgroundToImg($post->find('div.wall_text', 0)->innertext), '<a><br><img>');
|
$content = strip_tags(backgroundToImg($post->find('div.wall_text', 0)->innertext), '<a><br><img>');
|
||||||
$content .= $content_suffix;
|
$content .= $content_suffix;
|
||||||
|
if (!$content) {
|
||||||
|
$content = '(empty post)';
|
||||||
|
}
|
||||||
$content = str_get_html($content);
|
$content = str_get_html($content);
|
||||||
foreach ($content->find('img') as $img) {
|
foreach ($content->find('img') as $img) {
|
||||||
$parsed_src = parse_url($img->getAttribute('src'));
|
$parsed_src = parse_url($img->getAttribute('src'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue