Merge pull request #1331 from MrPetovan/bug/warnings

[twitter] Ward against missing remote_images array key
pull/1333/head
Michael Vogel 2022-12-11 03:40:42 +01:00 committed by GitHub
commit a2dde9cd24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {