Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordpres.../vendor_p.../guzzleht.../psr7/src
File: DroppingStream.php
<?php
[0] Fix | Delete
[1] Fix | Delete
declare (strict_types=1);
[2] Fix | Delete
namespace YoastSEO_Vendor\GuzzleHttp\Psr7;
[3] Fix | Delete
[4] Fix | Delete
use YoastSEO_Vendor\Psr\Http\Message\StreamInterface;
[5] Fix | Delete
/**
[6] Fix | Delete
* Stream decorator that begins dropping data once the size of the underlying
[7] Fix | Delete
* stream becomes too full.
[8] Fix | Delete
*/
[9] Fix | Delete
final class DroppingStream implements \YoastSEO_Vendor\Psr\Http\Message\StreamInterface
[10] Fix | Delete
{
[11] Fix | Delete
use StreamDecoratorTrait;
[12] Fix | Delete
/** @var int */
[13] Fix | Delete
private $maxLength;
[14] Fix | Delete
/** @var StreamInterface */
[15] Fix | Delete
private $stream;
[16] Fix | Delete
/**
[17] Fix | Delete
* @param StreamInterface $stream Underlying stream to decorate.
[18] Fix | Delete
* @param int $maxLength Maximum size before dropping data.
[19] Fix | Delete
*/
[20] Fix | Delete
public function __construct(\YoastSEO_Vendor\Psr\Http\Message\StreamInterface $stream, int $maxLength)
[21] Fix | Delete
{
[22] Fix | Delete
$this->stream = $stream;
[23] Fix | Delete
$this->maxLength = $maxLength;
[24] Fix | Delete
}
[25] Fix | Delete
public function write($string) : int
[26] Fix | Delete
{
[27] Fix | Delete
$diff = $this->maxLength - $this->stream->getSize();
[28] Fix | Delete
// Begin returning 0 when the underlying stream is too large.
[29] Fix | Delete
if ($diff <= 0) {
[30] Fix | Delete
return 0;
[31] Fix | Delete
}
[32] Fix | Delete
// Write the stream or a subset of the stream if needed.
[33] Fix | Delete
if (\strlen($string) < $diff) {
[34] Fix | Delete
return $this->stream->write($string);
[35] Fix | Delete
}
[36] Fix | Delete
return $this->stream->write(\substr($string, 0, $diff));
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function