From f9455b42c779dcbb1783616b2d7958a9884b32a6 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 13 Sep 2021 20:26:26 +0200 Subject: [PATCH] [twitter] Fix Notice --- twitter/twitter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index fe196e3e..45f8fe13 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -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); @@ -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]); -- 2.39.5