← All changes
|
vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php
+3
-0
27.8
→
trunk
View file →
| @@ -25,8 +25,11 @@ | ||
| 25 | 25 | $this->maxLength = $maxLength; |
| 26 | 26 | } |
| 27 | 27 | public function write($string) : int |
| 28 | 28 | { |
| 29 | + if (!\is_string($string)) { | |
| 30 | + \YoastSEO_Vendor\trigger_deprecation('guzzlehttp/psr7', '2.11', 'Passing %s to StreamInterface::write() is deprecated; guzzlehttp/psr7 3.0 requires string for $string.', \get_debug_type($string)); | |
| 31 | + } | |
| 29 | 32 | $diff = $this->maxLength - $this->stream->getSize(); |
| 30 | 33 | // Begin returning 0 when the underlying stream is too large. |
| 31 | 34 | if ($diff <= 0) { |
| 32 | 35 | return 0; |