Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Swader committed Nov 1, 2015
1 parent cb48bfc commit e68e6d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#Changelog
All notable changes will be documented in this file

## 1.0.1 - November 1st, 2016

- Minor fixes based on feedback from PHP-HTTP team
- authorUrl getter added to Article entity

## 1.0.0 - November 1st, 2016

- Converted to PHP-HTTP, removed hard dependency on Guzzle 5
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Crawl.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ public function call()
return new EntityIterator($jobs, $response);
} elseif (!isset($array['jobs']) && isset($array['response'])) {
return $array['response'];
} {
} else {
throw new DiffbotException('It appears something went wrong.');
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function createAppropriateIterator(Response $response)
$this->checkResponseFormat($response);

set_error_handler(function() { /* ignore errors */ });
$arr = json_decode((string)$response->getBody(), true, 512, 1);
$arr = json_decode($response->getBody(), true, 512, 1);
restore_error_handler();

$objects = [];
Expand All @@ -57,7 +57,7 @@ public function createAppropriateIterator(Response $response)
protected function checkResponseFormat(Response $response)
{
set_error_handler(function() { /* ignore errors */ });
$arr = json_decode((string)$response->getBody(), true, 512, 1);
$arr = json_decode($response->getBody(), true, 512, 1);
restore_error_handler();

if (isset($arr['error'])) {
Expand Down

0 comments on commit e68e6d6

Please sign in to comment.