Skip to content

Commit e68e6d6

Browse files
committed
Minor fixes
1 parent cb48bfc commit e68e6d6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#Changelog
22
All notable changes will be documented in this file
33

4+
## 1.0.1 - November 1st, 2016
5+
6+
- Minor fixes based on feedback from PHP-HTTP team
7+
- authorUrl getter added to Article entity
8+
49
## 1.0.0 - November 1st, 2016
510

611
- Converted to PHP-HTTP, removed hard dependency on Guzzle 5

src/Api/Crawl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ public function call()
453453
return new EntityIterator($jobs, $response);
454454
} elseif (!isset($array['jobs']) && isset($array['response'])) {
455455
return $array['response'];
456-
} {
456+
} else {
457457
throw new DiffbotException('It appears something went wrong.');
458458
}
459459
}

src/Factory/Entity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function createAppropriateIterator(Response $response)
3131
$this->checkResponseFormat($response);
3232

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

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

6363
if (isset($arr['error'])) {

0 commit comments

Comments
 (0)