Skip to content

Commit

Permalink
[twitter] Fix Notice
Browse files Browse the repository at this point in the history
  • Loading branch information
nupplaphil committed Sep 13, 2021
1 parent c7771ac commit f9455b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions twitter/twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,12 @@ function twitter_action(App $a, $uid, $pid, $action)
$post = ['id' => $pid];

Logger::debug('before action', ['action' => $action, 'pid' => $pid, 'data' => $post]);
$result = [];

try {
switch ($action) {
case 'delete':
// To-Do: $result = $connection->post('statuses/destroy', $post);
$result = [];
break;
case 'like':
$result = $connection->post('favorites/create', $post);
Expand All @@ -518,7 +518,6 @@ function twitter_action(App $a, $uid, $pid, $action)
break;
default:
Logger::warning('Unhandled action', ['action' => $action]);
$result = [];
}
} catch (TwitterOAuthException $twitterOAuthException) {
Logger::warning('Unable to communicate with twitter', ['action' => $action, 'data' => $post, 'code' => $twitterOAuthException->getCode(), 'exception' => $twitterOAuthException]);
Expand Down

0 comments on commit f9455b4

Please sign in to comment.