Skip to content

Commit

Permalink
Merge pull request #1169 from nupplaphil/bug/notices
Browse files Browse the repository at this point in the history
[twitter] Fix Notice
  • Loading branch information
annando committed Sep 13, 2021
2 parents c7771ac + f9455b4 commit a1c91db
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 a1c91db

Please sign in to comment.