summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-10 14:59:43 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-10 14:59:43 +0100
commit09099cfaeceada44dd4454a400d4753e2cc2f0b0 (patch)
tree5363fa08b0ec64c6d9eda03cd22e21b6469324a7 /apps/theming
parent4ecf4b46422b9245599651ccd9c4de7f943aa359 (diff)
downloadnextcloud-server-09099cfaeceada44dd4454a400d4753e2cc2f0b0.tar.gz
nextcloud-server-09099cfaeceada44dd4454a400d4753e2cc2f0b0.zip
Fix theming migration repair step by passing correct type for argument
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Jobs/MigrateBackgroundImages.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/theming/lib/Jobs/MigrateBackgroundImages.php b/apps/theming/lib/Jobs/MigrateBackgroundImages.php
index 54c0d591e40..97665d1179f 100644
--- a/apps/theming/lib/Jobs/MigrateBackgroundImages.php
+++ b/apps/theming/lib/Jobs/MigrateBackgroundImages.php
@@ -68,10 +68,9 @@ class MigrateBackgroundImages extends QueuedJob {
$this->logger = $logger;
}
- protected function run($argument): void {
- if (!isset($argument['stage'])) {
- // not executed in 25.0.0?!
- $argument['stage'] = self::STAGE_PREPARE;
+ protected function run(mixed $argument): void {
+ if (!is_array($argument) || !isset($argument['stage'])) {
+ throw new \Exception('Job '.self::class.' called with wrong argument');
}
switch ($argument['stage']) {
@@ -99,10 +98,10 @@ class MigrateBackgroundImages extends QueuedJob {
$userIds = $result->fetchAll(\PDO::FETCH_COLUMN);
$this->storeUserIdsToProcess($userIds);
} catch (\Throwable $t) {
- $this->jobList->add(self::class, self::STAGE_PREPARE);
+ $this->jobList->add(self::class, ['stage' => self::STAGE_PREPARE]);
throw $t;
}
- $this->jobList->add(self::class, self::STAGE_EXECUTE);
+ $this->jobList->add(self::class, ['stage' => self::STAGE_EXECUTE]);
}
/**