Skip to content

Commit

Permalink
Merge branch 'master' into Nyholm-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Jul 7, 2017
2 parents 0acdac3 + bd07d7e commit 86d962a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Change Log

## Unreleased
## 1.3.0

* Make sure `Stream::__toString` never throws exception
* Added more exception
* `BrokenPipeException`
* `ConnectionException`
* `InvalidRequestException`
* `SSLConnectionException`

## 1.2.0

* Dropped PHP 5.4 support
* Using stable version of `php-http/discovery`

## 1.1.0

Expand Down
6 changes: 5 additions & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public function __construct($socket, $size = null)
*/
public function __toString()
{
return (string) $this->getContents();
try {
return $this->getContents();
} catch (\Exception $e) {
return '';
}
}

/**
Expand Down

0 comments on commit 86d962a

Please sign in to comment.