Security update for Core, with self-updated composer
[yaffs-website] / vendor / zendframework / zend-diactoros / src / RelativeStream.php
index 631c41e0fcb366c555697986aaf768284afb1a0d..10a9308af58983cc9f5b76616c02c17b13f279e7 100644 (file)
@@ -1,9 +1,7 @@
 <?php
 /**
- * Zend Framework (http://framework.zend.com/)
- *
- * @see       http://github.com/zendframework/zend-diactoros for the canonical source repository
- * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ * @see       https://github.com/zendframework/zend-diactoros for the canonical source repository
+ * @copyright Copyright (c) 2015-2017 Zend Technologies USA Inc. (http://www.zend.com)
  * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
  */
 
@@ -48,7 +46,9 @@ final class RelativeStream implements StreamInterface
      */
     public function __toString()
     {
-        $this->seek(0);
+        if ($this->isSeekable()) {
+            $this->seek(0);
+        }
         return $this->getContents();
     }