From 8ebd31d6868b494789325ca6a5e81418242bcafe Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Thu, 10 Dec 2020 09:37:38 +0100 Subject: [PATCH] Make $vars and $secureRandom required. Signed-off-by: Daniel Kesselberg --- lib/base.php | 2 +- lib/private/AppFramework/Http/Request.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base.php b/lib/base.php index 115a0968af..3e89cbe6c5 100644 --- a/lib/base.php +++ b/lib/base.php @@ -159,7 +159,7 @@ class OC { 'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'], ], ]; - $fakeRequest = new \OC\AppFramework\Http\Request($params, null, new \OC\AllConfig(new \OC\SystemConfig(self::$config))); + $fakeRequest = new \OC\AppFramework\Http\Request($params, new \OC\Security\SecureRandom(), new \OC\AllConfig(new \OC\SystemConfig(self::$config))); $scriptName = $fakeRequest->getScriptName(); if (substr($scriptName, -1) == '/') { $scriptName .= 'index.php'; diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 3705ab2e92..a873ee9677 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -136,8 +136,8 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @param string $stream * @see http://www.php.net/manual/en/reserved.variables.php */ - public function __construct(array $vars = [], - ISecureRandom $secureRandom = null, + public function __construct(array $vars, + ISecureRandom $secureRandom, IConfig $config, CsrfTokenManager $csrfTokenManager = null, string $stream = 'php://input') {