Make $vars and $secureRandom required.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-12-10 09:37:38 +01:00
parent 27fdc6575d
commit 8ebd31d686
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
2 changed files with 3 additions and 3 deletions

View File

@ -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';

View File

@ -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') {