Skip to content

Commit a1c91db

Browse files
authored
Merge pull request #1169 from nupplaphil/bug/notices
[twitter] Fix Notice
2 parents c7771ac + f9455b4 commit a1c91db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

twitter/twitter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,12 @@ function twitter_action(App $a, $uid, $pid, $action)
497497
$post = ['id' => $pid];
498498

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

501502
try {
502503
switch ($action) {
503504
case 'delete':
504505
// To-Do: $result = $connection->post('statuses/destroy', $post);
505-
$result = [];
506506
break;
507507
case 'like':
508508
$result = $connection->post('favorites/create', $post);
@@ -518,7 +518,6 @@ function twitter_action(App $a, $uid, $pid, $action)
518518
break;
519519
default:
520520
Logger::warning('Unhandled action', ['action' => $action]);
521-
$result = [];
522521
}
523522
} catch (TwitterOAuthException $twitterOAuthException) {
524523
Logger::warning('Unable to communicate with twitter', ['action' => $action, 'data' => $post, 'code' => $twitterOAuthException->getCode(), 'exception' => $twitterOAuthException]);

0 commit comments

Comments
 (0)