mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
chore: Rename property and type it to match its current use in Request
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
26c5166790
commit
87f98c88ab
1 changed files with 3 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
|||
public const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost|\[::1\])$/';
|
||||
|
||||
protected string $inputStream;
|
||||
protected $content;
|
||||
private bool $isPutStreamContentAlreadySent = false;
|
||||
protected array $items = [];
|
||||
protected array $allowedKeys = [
|
||||
'get',
|
||||
|
|
@ -356,13 +356,13 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
|||
protected function getContent() {
|
||||
// If the content can't be parsed into an array then return a stream resource.
|
||||
if ($this->isPutStreamContent()) {
|
||||
if ($this->content === false) {
|
||||
if ($this->isPutStreamContentAlreadySent) {
|
||||
throw new \LogicException(
|
||||
'"put" can only be accessed once if not '
|
||||
. 'application/x-www-form-urlencoded or application/json.'
|
||||
);
|
||||
}
|
||||
$this->content = false;
|
||||
$this->isPutStreamContentAlreadySent = true;
|
||||
return fopen($this->inputStream, 'rb');
|
||||
} else {
|
||||
$this->decodeContent();
|
||||
|
|
|
|||
Loading…
Reference in a new issue