mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 08:03:45 +00:00
[twitter] Fix Undefined property: stdClass::$media_id_string notice
This commit is contained in:
parent
5b01292e68
commit
da86118283
1 changed files with 5 additions and 1 deletions
|
@ -591,7 +591,11 @@ function twitter_post_hook(App $a, array &$b)
|
||||||
|
|
||||||
unlink($tempfile);
|
unlink($tempfile);
|
||||||
|
|
||||||
|
if (isset($media->media_id_string)) {
|
||||||
$post['media_ids'] = $media->media_id_string;
|
$post['media_ids'] = $media->media_id_string;
|
||||||
|
} else {
|
||||||
|
throw new Exception('Failed upload of ' . $image);
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
logger('Exception when trying to send to Twitter: ' . $e->getMessage());
|
logger('Exception when trying to send to Twitter: ' . $e->getMessage());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue