Skip to content

Commit 86d962a

Browse files
authored
Merge branch 'master' into Nyholm-patch-1
2 parents 0acdac3 + bd07d7e commit 86d962a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Change Log
22

3-
## Unreleased
3+
## 1.3.0
4+
5+
* Make sure `Stream::__toString` never throws exception
6+
* Added more exception
7+
* `BrokenPipeException`
8+
* `ConnectionException`
9+
* `InvalidRequestException`
10+
* `SSLConnectionException`
11+
12+
## 1.2.0
13+
14+
* Dropped PHP 5.4 support
15+
* Using stable version of `php-http/discovery`
416

517
## 1.1.0
618

src/Stream.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ public function __construct($socket, $size = null)
5959
*/
6060
public function __toString()
6161
{
62-
return (string) $this->getContents();
62+
try {
63+
return $this->getContents();
64+
} catch (\Exception $e) {
65+
return '';
66+
}
6367
}
6468

6569
/**

0 commit comments

Comments
 (0)