$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
- !strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) {
+ !strstr($post['postopts'] ?? '', 'diaspora') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
- !strstr($post['postopts'], 'tumblr') || ($post['parent'] != $post['id'])) {
+ !strstr($post['postopts'] ?? '', 'tumblr') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
}
}
-
return;
}
- if (substr($post['app'], 0, 7) == 'Twitter') {
+ if (substr($post['app'] ?? '', 0, 7) == 'Twitter') {
DI::logger()->info('No Twitter app');
$b['execute'] = false;
return;
}
} else {
// Comments are never exported when we don't import the twitter timeline
- if (!strstr($post['postopts'], 'twitter') || ($post['parent'] != $post['id']) || $post['private']) {
+ if (!strstr($post['postopts'] ?? '', 'twitter') || ($post['parent'] != $post['id']) || $post['private']) {
DI::logger()->info('Comments are never exported when we don\'t import the twitter timeline');
$b['execute'] = false;
return;
// We only probe on Mastodon style URL to reduce the number of unsuccessful probes
twitter_add_contact($url->expanded_url, strpos($url->expanded_url, '@'), $uid);
}
- }
+ }
}
/**
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
- !strstr($post['postopts'], 'wppost') || ($post['parent'] != $post['id'])) {
+ !strstr($post['postopts'] ?? '', 'wppost') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}