diff --git a/src/Stream.php b/src/Stream.php index 9f5677f..507f135 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -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 ''; + } } /**