From: Hypolite Petovan Date: Sat, 10 Dec 2022 22:22:25 +0000 (-0500) Subject: [twitter] Ward against missing remote_images array key X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cab20de6d1b264fd66dc186a9267a9e85cfe7db2;p=friendica-addons.git [twitter] Ward against missing remote_images array key - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1345387060 --- diff --git a/twitter/twitter.php b/twitter/twitter.php index 973d0a9a..04145d0a 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -783,7 +783,7 @@ function twitter_post_hook(App $a, array &$b) $post = []; if (!empty($msgarr['images']) || !empty($msgarr['remote_images'])) { - Logger::info('Got images', ['id' => $b['id'], 'images' => $msgarr['images'], 'remote_images' => $msgarr['remote_images']]); + Logger::info('Got images', ['id' => $b['id'], 'images' => $msgarr['images'] ?? [], 'remote_images' => $msgarr['remote_images'] ?? []]); try { $media_ids = []; foreach ($msgarr['images'] ?? [] as $image) {