Avoid warnings in addons #639

Merged
annando merged 11 commits from warnings into develop 2018-07-10 14:30:23 +02:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 105452ef79 - Show all commits

View file

@ -1307,6 +1307,10 @@ function pumpio_fetchinbox(&$a, $uid)
$success = false;
}
if (!$success) {
return;
}
if ($user->items) {
$posts = array_reverse($user->items);

View file

@ -1135,7 +1135,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
$oembed_data = OEmbed::fetchURL($expanded_url);
if (empty($oembed_data)) {
if (empty($oembed_data) || empty($oembed_data->type)) {
continue;
}
@ -1516,7 +1516,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection,
foreach ($posts as $post) {
$postarray = twitter_createpost($a, $uid, $post, $self, false, false, false);
if (emptx($postarray['body'])) {
if (empty($postarray['body'])) {
continue;
}