diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index bb783809f9a3..e3ef47c83506 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -194,9 +194,9 @@ private static function prepareMountPointEntry(StorageConfig $storage, $isPerson */ public static function setUserVars($user, $input) { if (is_array($input)) { - foreach ($input as &$value) { + foreach ($input as $key => $value) { if (is_string($value)) { - $value = str_replace('$user', $user, $value); + $input[$key] = str_replace('$user', $user, $value); } } } else { @@ -220,8 +220,8 @@ public static function getBackendStatus($class, $options, $isPersonal, $testOnly if (self::$skipTest) { return StorageNotAvailableException::STATUS_SUCCESS; } - foreach ($options as &$option) { - $option = self::setUserVars(OCP\User::getUser(), $option); + foreach ($options as $key => $option) { + $option[$key] = self::setUserVars(OCP\User::getUser(), $option); } if (class_exists($class)) { try {