diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-04-19 16:33:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 16:33:50 +0300 |
commit | a0722777740648aae1869a04c5a894c06c3b737a (patch) | |
tree | 1c5e43f21c9b33c9acdd7706cd2eb563ac4c89f4 | |
parent | 3d6ec16a2d0ffad4cfac48fee9adeda86f92df51 (diff) | |
parent | 4dc2a779f5bf4420a19babc12c1f2bbbb853e1ce (diff) |
Merge pull request #2308 from nextcloud/ci/stable24/fix_static_analysis
Fix matrix variable reference in Github static-analysis action
-rw-r--r-- | .github/workflows/static-analysis.yml | 2 | ||||
-rw-r--r-- | lib/Controller/ImageController.php | 4 |
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); |