Skip to content

Commit

Permalink
Removed redundant error checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
m4tthumphrey committed Apr 15, 2012
1 parent 058c5d0 commit 02d74cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions classes/provider/oauth/tumblr.php
Expand Up @@ -24,11 +24,6 @@ public function callback($request)
{
$data = $request->execute();
$data = json_decode(json_encode($data))->body;

if ($data->meta->status !== 200)
{
throw new ApiException($data->meta->msg);
}
}
catch (ApiException $e)
{
Expand All @@ -38,7 +33,7 @@ public function callback($request)
{
$message = 'An error occurred connecting to the Tumblr servers';
$code = 0;

$data = json_decode($e->getMessage());

if (isset($data->meta->msg))
Expand Down
5 changes: 0 additions & 5 deletions classes/provider/oauth/twitter.php
Expand Up @@ -25,11 +25,6 @@ public function callback($request)
{
$data = $request->execute();
$data = json_decode($data);

if (isset($data->error))
{
throw new ApiException($data->error);
}
}
catch (ApiException $e)
{
Expand Down

0 comments on commit 02d74cd

Please sign in to comment.