Skip to content

Commit

Permalink
Merge pull request #49602 from nextcloud/fix/external-storage-service…
Browse files Browse the repository at this point in the history
…-cast-id

fix(external_storage): Cast id to int
  • Loading branch information
oleksandr-nc authored Dec 3, 2024
2 parents 6014be4 + 1022c47 commit f1754ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files_external/lib/Service/StoragesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function readConfig() {
* @return StorageConfig
* @throws NotFoundException if the storage with the given id was not found
*/
public function getStorage($id) {
public function getStorage(int $id) {
$mount = $this->dbConfig->getMountById($id);

if (!is_array($mount)) {
Expand Down Expand Up @@ -433,7 +433,7 @@ public function updateStorage(StorageConfig $updatedStorage) {
*
* @throws NotFoundException if no storage was found with the given id
*/
public function removeStorage($id) {
public function removeStorage(int $id) {
$existingMount = $this->dbConfig->getMountById($id);

if (!is_array($existingMount)) {
Expand Down

0 comments on commit f1754ee

Please sign in to comment.