Merge pull request #49624 from nextcloud/backport/49602/stable30

[stable30] fix(external_storage): Cast id to int
This commit is contained in:
John Molakvoæ 2024-12-12 13:18:57 +01:00 committed by GitHub
commit 256e9a9404
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -134,7 +134,7 @@ abstract class StoragesService {
* @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)) {
@ -450,7 +450,7 @@ abstract class StoragesService {
*
* @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)) {