Merge pull request #36081 from nextcloud/stable25-fix/fix-theming-repair-step

[stable25] Fix theming migration repair step by passing correct type for argument
This commit is contained in:
Vincent Petry 2023-01-11 12:31:55 +01:00 committed by GitHub
commit 0b5c372195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,9 +69,8 @@ class MigrateBackgroundImages extends QueuedJob {
}
protected function run($argument): void {
if (!isset($argument['stage'])) {
// not executed in 25.0.0?!
$argument['stage'] = self::STAGE_PREPARE;
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]);
}
/**