Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/static-analysis.yml2
-rw-r--r--lib/Controller/ImageController.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 043e97475..e2caf4ca3 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -16,7 +16,7 @@ jobs:
- name: Set up php
uses: shivammathur/setup-php@master
with:
- php-version: {{ matrix.php-version }}
+ php-version: ${{ matrix.php-version }}
tools: composer:v1
coverage: none
- name: Install dependencies
diff --git a/lib/Controller/ImageController.php b/lib/Controller/ImageController.php
index 108a86a10..4ccd5b313 100644
--- a/lib/Controller/ImageController.php
+++ b/lib/Controller/ImageController.php
@@ -150,7 +150,7 @@ class ImageController extends Controller {
$userId = $this->getUserIdFromSession($documentId, $sessionId, $sessionToken);
$uploadResult = $this->imageService->uploadImage($documentId, $newFileName, $newFileResource, $userId);
}
- if (isset($insertResult['error'])) {
+ if (isset($uploadResult['error'])) {
return new DataResponse($uploadResult, Http::STATUS_BAD_REQUEST);
} else {
return new DataResponse($uploadResult);
@@ -220,7 +220,7 @@ class ImageController extends Controller {
return $imageFile !== null
? new DataDownloadResponse(
$imageFile->getContent(),
- Http::STATUS_OK,
+ (string) Http::STATUS_OK,
$this->getSecureMimeType($imageFile->getMimeType())
)
: new DataResponse('', Http::STATUS_NOT_FOUND);