[twitter] Ward against missing remote_images array key #1331

Merged
MrPetovan merged 1 commit from bug/warnings into 2022.12-rc 2022-12-11 03:40:42 +01:00

View file

@ -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) {