diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-03 12:08:44 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-05-03 12:08:44 +0200 |
| commit | 160e7b4faced96286d43a16e79f704707fdcea4f (patch) | |
| tree | 3a8522f5bfa5d6c3a4a9460404fc1d295e30a936 | |
| parent | 2df806ab549ac7b7522fb3443e654d83b7095843 (diff) | |
prevent warning in migration, re #2071
| -rw-r--r-- | db/migrations/5.4.3_combine_my_courses_view_settings.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/migrations/5.4.3_combine_my_courses_view_settings.php b/db/migrations/5.4.3_combine_my_courses_view_settings.php index f191a53..0e62cbe 100644 --- a/db/migrations/5.4.3_combine_my_courses_view_settings.php +++ b/db/migrations/5.4.3_combine_my_courses_view_settings.php @@ -119,12 +119,12 @@ final class CombineMyCoursesViewSettings extends Migration { return [ 'regular' => [ - 'tiled' => (bool) $config['MY_COURSES_TILED_DISPLAY'], - 'only_new' => (bool) $config['MY_COURSES_SHOW_NEW_ICONS_ONLY'], + 'tiled' => (bool) ($config['MY_COURSES_TILED_DISPLAY'] ?? self::OLD_FIELDS['MY_COURSES_TILED_DISPLAY']), + 'only_new' => (bool) ($config['MY_COURSES_SHOW_NEW_ICONS_ONLY'] ?? self::OLD_FIELDS['MY_COURSES_SHOW_NEW_ICONS_ONLY']), ], 'responsive' => [ - 'tiled' => (bool) $config['MY_COURSES_TILED_DISPLAY_RESPONSIVE'], - 'only_new' => (bool) $config['MY_COURSES_SHOW_NEW_ICONS_ONLY'], + 'tiled' => (bool) ($config['MY_COURSES_TILED_DISPLAY_RESPONSIVE'] ?? self::OLD_FIELDS['MY_COURSES_TILED_DISPLAY_RESPONSIVE']), + 'only_new' => (bool) ($config['MY_COURSES_SHOW_NEW_ICONS_ONLY'] ?? self::OLD_FIELDS['MY_COURSES_SHOW_NEW_ICONS_ONLY']), ], ]; } |
