]> git.mxchange.org Git - friendica-addons.git/commitdiff
[twitter] Ward against missing remote_images array key
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 22:22:25 +0000 (17:22 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Dec 2022 22:22:25 +0000 (17:22 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1345387060

twitter/twitter.php

index 973d0a9a43a9ad03afe7e35a7b5bb7aca421ca32..04145d0aeda1c9f44e95804b531902fa0809c5de 100644 (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) {