Issue #3254446 by catch: Log the exception rather than aborting the update if a configuration item does not exist in system_post_update_sort_all_config()

(cherry picked from commit 6eb195c0a0)
merge-requests/1427/merge
xjm 2023-01-03 01:03:58 -06:00
parent d83d02a815
commit f508cabb8d
No known key found for this signature in database
GPG Key ID: 206B0B8743BDF4C2
1 changed files with 6 additions and 1 deletions

View File

@ -223,7 +223,12 @@ function system_post_update_sort_all_config(&$sandbox) {
$start = $sandbox['progress']; $start = $sandbox['progress'];
$end = min($sandbox['max'], $start + $iteration_size); $end = min($sandbox['max'], $start + $iteration_size);
for ($i = $start; $i < $end; $i++) { for ($i = $start; $i < $end; $i++) {
$factory->getEditable($sandbox['all_config_names'][$i])->save(); try {
$factory->getEditable($sandbox['all_config_names'][$i])->save();
}
catch (\Exception $e) {
watchdog_exception('system', $e);
}
} }
if ($sandbox['max'] > 0 && $end < $sandbox['max']) { if ($sandbox['max'] > 0 && $end < $sandbox['max']) {