aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-01-03 14:32:31 +0100
committerGitHub <noreply@github.com>2023-01-03 14:32:31 +0100
commit06da8adcd309952b7b83ebfaa88c7259a41cd2ed (patch)
tree47f1a69fe4f452098bfa62689bad43a7604a7a69 /apps/dav/lib
parent4e877b7ff1977389a67cafd6f028f40f83bc91b3 (diff)
parenta7740c0ae67490aba55e9a05fcb09e7049818341 (diff)
downloadnextcloud-server-06da8adcd309952b7b83ebfaa88c7259a41cd2ed.tar.gz
nextcloud-server-06da8adcd309952b7b83ebfaa88c7259a41cd2ed.zip
Merge pull request #35943 from nextcloud/fix/code-fixes-from-34997
Code fixes from PR 34997
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php4
-rw-r--r--apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php21
2 files changed, 11 insertions, 14 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 3a871b06259..fd8a6437222 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -273,9 +273,9 @@ class File extends Node implements IFile {
if ($result === false) {
$expected = -1;
if (isset($_SERVER['CONTENT_LENGTH'])) {
- $expected = $_SERVER['CONTENT_LENGTH'];
+ $expected = (int)$_SERVER['CONTENT_LENGTH'];
}
- if ($expected !== "0") {
+ if ($expected !== 0) {
throw new Exception(
$this->l10n->t(
'Error while copying file to target location (copied: %1$s, expected filesize: %2$s)',
diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php
index f92bc4f3a0d..98be4e41917 100644
--- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php
+++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php
@@ -36,7 +36,6 @@ use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
class AppleProvisioningPlugin extends ServerPlugin {
-
/**
* @var Server
*/
@@ -68,23 +67,21 @@ class AppleProvisioningPlugin extends ServerPlugin {
protected $l10n;
/**
- * @var \closure
+ * @var \Closure
*/
protected $uuidClosure;
/**
* AppleProvisioningPlugin constructor.
- *
- * @param IUserSession $userSession
- * @param IURLGenerator $urlGenerator
- * @param \OC_Defaults $themingDefaults
- * @param IRequest $request
- * @param IL10N $l10n
- * @param \closure $uuidClosure
*/
- public function __construct(IUserSession $userSession, IURLGenerator $urlGenerator,
- \OC_Defaults $themingDefaults, IRequest $request,
- IL10N $l10n, \closure $uuidClosure) {
+ public function __construct(
+ IUserSession $userSession,
+ IURLGenerator $urlGenerator,
+ \OC_Defaults $themingDefaults,
+ IRequest $request,
+ IL10N $l10n,
+ \Closure $uuidClosure
+ ) {
$this->userSession = $userSession;
$this->urlGenerator = $urlGenerator;
$this->themingDefaults = $themingDefaults;