[twitter] Ward against missing remote_images array key #1331

Merged
MrPetovan merged 1 commits from bug/warnings into 2022.12-rc 2022-12-11 03:40:42 +01:00
1 changed files with 1 additions and 1 deletions

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