aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-07-01 10:25:14 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2025-07-01 10:25:14 +0200
commit87f98c88ab03f5196e697052482d996ebfaa36fc (patch)
tree8c345ff22b9db683552f798bfaebec6d14281d41
parent26c5166790a1620ea4248229f4997330493a998d (diff)
downloadnextcloud-server-87f98c88ab03f5196e697052482d996ebfaa36fc.tar.gz
nextcloud-server-87f98c88ab03f5196e697052482d996ebfaa36fc.zip
chore: Rename property and type it to match its current use in Request
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/AppFramework/Http/Request.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index d177221556c..bc45a653e7f 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -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();