Skip to content
Snippets Groups Projects
Commit a17d24f0 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #652232 by moshe weitzman: don't assume that session exists during batch cleanup.

parent 66f740c5
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -448,10 +448,12 @@ function _batch_finished() {
$_batch = $batch;
$batch = NULL;
// Clean-up the session.
unset($_SESSION['batches'][$batch['id']]);
if (empty($_SESSION['batches'])) {
unset($_SESSION['batches']);
// Clean-up the session. Not needed for CLI updates.
if (isset($_SESSION)) {
unset($_SESSION['batches'][$batch['id']]);
if (empty($_SESSION['batches'])) {
unset($_SESSION['batches']);
}
}
// Redirect if needed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment