https://reisub.nsupdate.info/git
/
friendica-addons.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
440e929
)
Merge pull request #751 from MrPetovan/bug/twitter-fix-media_id_string-notice
author
Tobias Diekershoff
<tobias.diekershoff@gmx.net>
Sun, 14 Oct 2018 15:43:11 +0000
(17:43 +0200)
committer
GitHub
<noreply@github.com>
Sun, 14 Oct 2018 15:43:11 +0000
(17:43 +0200)
[twitter] Fix Undefined property: stdClass::$media_id_string notice
twitter/twitter.php
patch
|
blob
|
history
diff --git
a/twitter/twitter.php
b/twitter/twitter.php
index
5a808d3
..
9f07fa5
100644
(file)
--- a/
twitter/twitter.php
+++ b/
twitter/twitter.php
@@
-591,7
+591,11
@@
function twitter_post_hook(App $a, array &$b)
unlink($tempfile);
- $post['media_ids'] = $media->media_id_string;
+ if (isset($media->media_id_string)) {
+ $post['media_ids'] = $media->media_id_string;
+ } else {
+ throw new Exception('Failed upload of ' . $image);
+ }
} catch (Exception $e) {
logger('Exception when trying to send to Twitter: ' . $e->getMessage());