From 75200da1bc5594b6c0e4f81cfdb9b81864edf87b Mon Sep 17 00:00:00 2001 From: aymm Date: Thu, 11 Mar 2021 16:29:56 +0000 Subject: [PATCH] Fixed reading redirect location --- src/APnutI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/APnutI.php b/src/APnutI.php index 6120aff..66b3669 100644 --- a/src/APnutI.php +++ b/src/APnutI.php @@ -531,7 +531,7 @@ class APnutI try { $r = $this->get('/users/'.$user_id.'/avatar', $args, 'application/json', false); } catch (HttpPnutRedirectException $re) { - return $re->getMessage(); + return $re->response; } $this->logger->error('Could not fetch avatar: No redirection! ' . json_encode($r)); throw new PnutException('Could not fetch avatar: No redirection!');