Skip to content

Commit

Permalink
Quick bug-fix to last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetterMG committed Oct 3, 2020
1 parent 65d7c0c commit 85f2481
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SitemapParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace vipnytt;

use GuzzleHttp;
use Psr\Http\Message\StreamInterface;
use SimpleXMLElement;
use vipnytt\SitemapParser\Exceptions;
use vipnytt\SitemapParser\UrlParser;
Expand Down Expand Up @@ -214,7 +213,7 @@ protected function clean()
/**
* Request the body content of an URL
*
* @return StreamInterface Returns the body as a stream.
* @return string Raw body content
* @throws Exceptions\TransferException
* @throws Exceptions\SitemapParserException
*/
Expand All @@ -230,7 +229,7 @@ protected function getContent()
}
$client = new GuzzleHttp\Client();
$res = $client->request('GET', $this->currentURL, $this->config['guzzle']);
return $res->getBody();
return $res->getBody()->getContents();
} catch (GuzzleHttp\Exception\TransferException $e) {
throw new Exceptions\TransferException('Unable to fetch URL contents', 0, $e);
} catch (GuzzleHttp\Exception\GuzzleException $e) {
Expand Down

0 comments on commit 85f2481

Please sign in to comment.